Repository navigation
docs(specs): Python AID-EMIT-1 emitter and LiteLLM adapter design drafts - #600
Merged
Merged
Conversation
docs/specs/aid-emit-py.md designs aid-emit, a second, independent AID-EMIT-1 emitter in Python, with a conformance plan against the section 12 vectors. docs/specs/litellm-aid-emit.md outlines a LiteLLM proxy adapter (observe, shadow, enforce) built on it. Both target the AI Identity platform and OCSF rather than a gateway: native OCSF fields first, and an aid.* vocabulary under unmapped for the gaps (aid.stream, aid.decision, aid.request_id), proposed for AID-EMIT-1 as an additive 1.2.0 vocabulary profile. scripts/aid_emit_py_vector_check.py re-derives both signed records of the cpex-ocsf-audit dispatch vector in Python; fingerprints and signatures are byte-identical. The emitter spec records one conformance gap in the reference emitter: metadata.uid comes from a per-process counter, so it repeats on the same chain after a restart (AID-EMIT-1 section 6 requires uniqueness). Design only. Nothing is implemented.
This was referenced Oct 12, 2026
main gained #601 and #602, which both added CHANGELOG entries at the top of Unreleased, so CHANGELOG.md conflicted. Resolved by taking main's CHANGELOG and re-adding this PR's one entry under Added. Also formats the EmitterConfig example in docs/specs/aid-emit-py.md the way ruff 0.16.9 (pinned in requirements-dev.txt) does: it formats Python code blocks inside Markdown, and ruff format --check failed CI on it. Content unchanged.
Levaj2000
marked this pull request as ready for review
October 12, 2026 22:10
Levaj2000
added a commit
that referenced
this pull request
Oct 13, 2026
…T-1 1.2.0 (#604) The #600 drafts were written against the two-vocabulary proposal (aid.* for AI Identity emitters, cpex.* for the CPEX family) that #603 replaced: 1.2.0 retires cpex.* for every emitter and widens the section 4 value space to the whole of RFC 8785. aid-emit-py.md: implements 1.2.0-draft; section 4.1 is now the section 1.2 member table with no vocabulary option (LiteLLM, a non-CMF host, writes aid.request_id and aid.litellm.*); the value-space check rejects only what JSON cannot carry; the in-tree canonicalizer is a full RFC 8785, ported from the validator, since sorted json.dumps no longer matches and the rfc8785 package rejects the stream epoch; the T1 note says the dispatch vector is unchanged by the rename; finding 2 is settled the other way by 1.2.0. litellm-aid-emit.md: field names per 1.2.0 section 1.2; the decision bullet records that 1.2.0 settled it. Docs only.
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.
Summary
Design drafts, nothing implemented:
docs/specs/aid-emit-py.md:aid-emit, a Python implementation of the AID-EMIT-1 emitter class. Canonical bytes, DSSE signing, chain and stream state, epoch and restart handling, a durable spool, an ingest shipper, and a conformance plan (T1 to T7) against the section 12 vectors.docs/specs/litellm-aid-emit.md: a LiteLLM proxy adapter on top of it, in three phases (observe, shadow, enforce). Covers the hook plan, exactly-once emission, verdict and field mappings, security requirements, a one-week phase 1 build plan, the decisions taken, and five open questions.scripts/aid_emit_py_vector_check.py: re-derives both signed records ofintegrations/cpex-ocsf-audit/SAMPLE-OUTPUT.mdin Python (stdlibjsonpluscryptographywith RFC 6979). Fingerprints and signatures are byte-identical to the vector.[Unreleased]/ Added.Decided
aid.*vocabulary underunmapped(aid.stream,aid.decision,aid.request_id,aid.litellm.*). See section 4.1 ofaid-emit-py.md.Follow-ups this depends on
scripts/aid_emit1_validator.pyand the platform ingest endpoint must read stream stamps fromaid.streamas well ascpex.stream.metadata.uidrepeats after a restart, against section 6. The proposed fix scopes uids by epoch and regenerates the vectors.Testing
ruff checkandruff format --checkpass on the new script under this repo's config.