Rewrite SPEC.md as a full normative system specification (+ v0.2 production-hardening spec) - #2
Draft
mosesman831 wants to merge 3 commits into
Draft
Rewrite SPEC.md as a full normative system specification (+ v0.2 production-hardening spec)#2mosesman831 wants to merge 3 commits into
mosesman831 wants to merge 3 commits into
Conversation
Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
…s to SPEC.md Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the previous high-level
SPEC.md(a ~150-line brand/architecture overview) with a complete, normative specification of every aspect of the Axion Worker, written against the actual code insrc/, then extends it with a fully specified v0.2 production-hardening milestone and a conformance-invariants appendix. No code changes.Part 1 — full normative spec of the shipped system (spec 1.0.0)
x-axion-session; SSE detection, tee semantics,SseLineParserrecord/field rules, and UTF-8 decoder flush requirements; the background-extraction never-break-the-proxy contract.Part 2 — v0.2 production-hardening specification (spec 1.1.0, §27)
A new major section specifying the next milestone to implementation precision — normative when built, nothing implemented today. Governed by five explicit rules (default-off, additive-only, invariant-preserving, fail-open on infra / fail-closed on auth, invalid config never breaks requests):
DELETE /api/beliefs/:id.x-axion-ratelimit-*headers.truncateddisclosure, TTL via DO alarms, lazy idempotent v1→v2 migration, and privacy controls (AXION_STORE_RAW_TEXT,x-axion-no-store).since/type/minConfidencefilters, O(page) reads./healthz; a structured log-event schema with a full event table and redaction rules; Analytics Engine metrics; HMAC-signed webhook export with at-least-once semantics and an OTel attribute mapping.Part 3 — Appendix C: conformance checklist
Twenty testable invariants (I1–I20) of the shipped system — zero-buffering, no
Bearer undefined, header allowlist, session-header echo rules, enforce idempotency, DO-id non-leakage, UTF-8/SSE correctness, log redaction, no-invalidation-claims — each cross-referenced to its normative section and suitable as a standing regression test.Companion doc updates
TECHNICAL.mdandSPEC-PolyVerdict.mddefer toSPEC.mdas the normative source;README.mdpoints to it.BUILD-SPEC.mdremains untouched as the locked product-decision record; the spec is consistent with D1–D8, and §27 explicitly notes that BUILD-SPEC non-goals bind the current build while §27 defines the next milestone's contract.