Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
83d79a8
Import runtime-evaluated annotation names unconditionally in the UoW
leynos Aug 22, 2026
5292ac8
Add provider request options, JSON mode, and a configurable timeout
leynos Aug 22, 2026
7d154f2
Omit zero-valued optional usage metrics from provider-call usage
leynos Aug 22, 2026
d3a7a34
Persist pricing snapshots before pinning or recording against them
leynos Aug 22, 2026
0eed5c7
Ship pricing snapshots in the image and add the 2026-08 snapshot
leynos Aug 22, 2026
3bd7d8b
Give the chart volume support and boot-required local preview values
leynos Aug 22, 2026
49ca840
Provision auth and OpenAI credentials in the local preview secret
leynos Aug 22, 2026
44ac35f
Fix the Skylos interpreter pin and the skylos-allow target
leynos Aug 22, 2026
0e61b79
Document preview migrations, object-store lifetime, and alpha findings
leynos Aug 22, 2026
989f5f3
Record the successful end-to-end no-QA generation run
leynos Aug 22, 2026
c71c3dd
Harden runtime composition from review feedback
leynos Aug 22, 2026
970b67f
Price provider usage once and harden snapshot persistence
leynos Aug 22, 2026
ba6bbc3
Keep preview secrets out of command arguments
leynos Aug 22, 2026
a93d9ea
Document canonical port and storage contracts from review feedback
leynos Aug 22, 2026
242fc93
Strengthen test coverage and hygiene from review feedback
leynos Aug 22, 2026
2a3bd29
Document tracing, provider options, and preview credentials in guides
leynos Aug 22, 2026
5294608
Reject malformed provider usage and pricing snapshot inputs
leynos Aug 23, 2026
264ce20
Extend runtime, snapshot, and preview configuration test coverage
leynos Aug 23, 2026
1f36c9f
Document effective dates, preview credentials, and alpha progress
leynos Aug 23, 2026
2ded8ee
Prove runtime option propagation, autospec safety, and image packaging
leynos Aug 24, 2026
419bc51
Carry effective_from as a timezone-aware datetime in the domain
leynos Aug 24, 2026
a12c858
Split chat usage normalization into validation and metric helpers
leynos Aug 24, 2026
7597d3a
Add property and concurrency coverage for usage and snapshot invariants
leynos Aug 24, 2026
603985b
Harden preview manifests and credential handling from review feedback
leynos Aug 27, 2026
0e4f1a9
Keep snapshot resolution read-only and reject invalid effective dates
leynos Aug 27, 2026
a6267a6
Tighten review-driven test contracts and documentation
leynos Aug 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ RUN groupadd --system --gid 10001 episodic \
&& chown -R episodic:episodic /app

COPY --from=builder --chown=episodic:episodic /app/.venv /app/.venv
# Pricing snapshots are read at boot; the packaged default path resolves
# inside site-packages, so ship the repository snapshots and point
# PRICING_SNAPSHOT_DIRECTORY at this location in deployment configuration.
COPY --chown=episodic:episodic config/pricing-snapshots /app/config/pricing-snapshots

USER 10001:10001

Expand Down
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ DF12_FUTURE_ANNOTATIONS = $(DF12_PYLINT_BASE) --enable=C9112 \
AMBRLEAKS = $(UV_ENV) $(UV) tool run --python $(DF12_PYTHON) \
--from '$(DF12_PYTHON_LINTS)' ambrleaks
SKYLOS_VERSION = 4.33.2
SKYLOS = $(UV_ENV) $(UV) tool run --from 'skylos==$(SKYLOS_VERSION)' skylos \
# Pin the tool interpreter: Skylos parses sources with its own runtime `ast`,
# so an older default Python misreads the project's 3.14 syntax.
SKYLOS_CLI = $(UV_ENV) $(UV) tool run --python 3.14 \
--from 'skylos==$(SKYLOS_VERSION)' skylos
SKYLOS = $(SKYLOS_CLI) \
--config-file pyproject.toml
SKYLOS_PRODUCTION_TARGETS ?= alembic episodic openai_test_types.py

Expand Down Expand Up @@ -111,12 +115,18 @@ lint: check-architecture ## Run linters
$(AMBRLEAKS) tests
$(SKYLOS) $(SKYLOS_PRODUCTION_TARGETS) --category dead_code --gate --format concise --no-upload --no-provenance --no-grep-verify

skylos-allow: export SKYLOS_NAME = $(value NAME)
skylos-allow: export SKYLOS_REASON = $(value REASON)
# Accept NAME/REASON only from the make command line so ambient environment
# variables (for example, a host NAME export) cannot leak into the whitelist.
cli_value = $(if $(filter command line,$(origin $(1))),$(value $(1)))

skylos-allow: export SKYLOS_NAME = $(call cli_value,NAME)
skylos-allow: export SKYLOS_REASON = $(call cli_value,REASON)
skylos-allow: ## Document one named Skylos exception, not an entry point
Comment thread
coderabbitai[bot] marked this conversation as resolved.
@test -n "$${SKYLOS_NAME}" || { printf "Error: NAME is required for a named whitelist exception\\n" >&2; exit 2; }
@test -n "$${SKYLOS_REASON}" || { printf "Error: REASON is required for a named whitelist exception\\n" >&2; exit 2; }
$(SKYLOS) whitelist "$${SKYLOS_NAME}" --reason "$${SKYLOS_REASON}"
# The whitelist subcommand must be skylos's first argument; global
# options such as --config-file make the main parser treat it as a path.
$(SKYLOS_CLI) whitelist "$${SKYLOS_NAME}" --reason "$${SKYLOS_REASON}"

check-architecture: build ## Check hexagonal architecture import boundaries
$(UV_ENV) $(UV) run hecate check
Expand Down
8 changes: 8 additions & 0 deletions charts/episodic/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ spec:
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
34 changes: 34 additions & 0 deletions charts/episodic/values.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,47 @@ image:

config:
EPISODIC_ENV: local
# The HTTP runtime refuses to boot without these settings, so the local
# preview must supply them. The object store writes beneath /tmp, which
# the emptyDir volume below keeps writable under the chart's
# readOnlyRootFilesystem default.
SOURCE_INTAKE_OBJECT_STORE_ROOT: /tmp/episodic-object-store
PRICING_SNAPSHOT_DIRECTORY: /app/config/pricing-snapshots
API_AUTHORIZATION_PRINCIPAL_ID: local-preview
DRAFT_MODEL: gpt-5.6-sol
OPENAI_REASONING_EFFORT: low
OPENAI_TOKEN_LIMIT_PARAM: max_completion_tokens
OPENAI_TIMEOUT_SECONDS: "600"
GENERATION_MAX_OUTPUT_TOKENS: "32768"

# Keep the chart's readOnlyRootFilesystem default and make /tmp writable
# through an emptyDir so the source-intake object store has somewhere to
# write. The volume is pod-scoped: blobs vanish when the pod is replaced.
volumes:
- name: tmp
emptyDir: {}
volumeMounts:
- name: tmp
mountPath: /tmp

existingSecretName: episodic-local
allowMissingSecret: false
secretEnvFromKeys:
DATABASE_URL:
key: database-url
optional: false
API_AUTHORIZATION_BEARER_TOKEN:
key: api-bearer-token
optional: false
# The OpenAI pair is optional so the preview still boots without a key;
# the runtime requires both or neither, and the preview secret writes
# both together.
OPENAI_BASE_URL:
key: openai-base-url
optional: true
OPENAI_API_KEY:
key: openai-api-key
optional: true

ingress:
enabled: true
Expand Down
6 changes: 6 additions & 0 deletions charts/episodic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ podDisruptionBudget:
minAvailable: 1
# maxUnavailable: 1 # Use this OR minAvailable, not both.

# Extra pod volumes and container volume mounts, passed through verbatim.
# The container runs with readOnlyRootFilesystem, so any writable path
# (for example, the source-intake object store root) needs a volume here.
volumes: []
volumeMounts: []

nodeSelector: {}
tolerations: []
affinity: {}
15 changes: 15 additions & 0 deletions config/pricing-snapshots/openai-2026-08.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
pricing_snapshot_id: 018f15f8-8c12-7c3a-9e9f-9f8f8f8f8f92
provider_name: openai
model: gpt-5.6-sol
operation: chat_completions
source_kind: provider_rate_card
currency: USD
billing_period_key: "2026-08"
Comment thread
leynos marked this conversation as resolved.
rates_minor_per_metric:
input_tokens: 200
output_tokens: 1000
cached_input_tokens: 20
Comment thread
coderabbitai[bot] marked this conversation as resolved.
source_metadata:
source_url: https://developers.openai.com/api/docs/pricing
retrieved_at: "2026-08-22T00:00:00Z"
effective_from: "2026-08-01T00:00:00Z"
Loading
Loading