Add deterministic ARIA drift classifier, evidence materialization, and drift-aware graph/impact#11
Open
danielbdyer wants to merge 1 commit into
Open
Conversation
danielbdyer
pushed a commit
that referenced
this pull request
Apr 25, 2026
Move U from Agent A's audit (#11) — names the categorical "manifest-as-cone-apex" pattern that v2-direction.md §1 claims ("the manifest is the contract") but which the codebase realized only ad-hoc. The conceit: every manifest verb fans out into ~5 parallel projections (probe fixture, rung-2 classifier, rung-3 classifier, runtime handler, MCP tool). Adding a verb is a **single obligation** doctrinally but a **5-place update** in practice; nothing typed tied them together. **The witness** (product/domain/manifest/manifest-cone.ts): export type ManifestBaseProjection = | 'probe-fixture' | 'verb-classifier' | 'rung3-classifier' | 'runtime-handler' | 'mcp-tool'; export interface ManifestCone { readonly apex: Manifest; readonly baseNames: readonly ManifestBaseProjection[]; readonly projection<T>(name, lookup): readonly { verb, projection: T | null }[]; readonly missingProjections<T>(name, lookup): readonly VerbEntry[]; } manifestCone(manifest) → ManifestCone The `projection<T>(name, lookup)` method is the per-verb pull-back: given a base-projection name + a lookup function `(VerbEntry) => T | null`, returns one entry per manifest verb showing whether that projection exists. `missingProjections<T>(name, lookup)` is the convenience — returns only the verbs lacking the projection. Future architecture-law tests can use it: "every verb has a probe fixture" becomes: const missing = cone.missingProjections('probe-fixture', findFixtureForVerb); expect(missing).toEqual([]); This commit only adds the abstraction. Adoption in arch-law tests is a follow-up — one law per base projection, asserting the empty-missing invariant. Each adoption replaces a bespoke "iterate manifest verbs and grep for fixture" loop with a one-line cone query. **Tests**: 4071 passing / 10 skipped (was 4065 post-I+L). +6 from manifest-cone.laws.spec.ts: - L-Apex-Preserved - L-BaseNames-Closed - L-Projection-Order-Stable - L-Missing-Empty-When-Total - L-Missing-All-When-Empty - partial-projection mixed case Build ok; manifest drift clean. https://claude.ai/code/session_01RyCaLypF4TrZqMjuqKpKM6
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.
Motivation
Description
lib/domain/drift.tsthat compares baseline vs current ARIA snapshots and emits typed deltas (role-change,accessible-name-change,structural-move-order-change,addition-removal) plus deterministic fingerprints viastableStringify/sha256and normalized snapshot handling.expectAriaSnapshotnow computes and returns aDriftClassificationresult while keeping the existing assertion semantics (changes inlib/runtime/aria.tsandlib/runtime/program.ts).materializeDriftEvidenceinlib/application/drift.tsand wired a new CLI commanddriftso drift reports are materialized under.tesseract/evidence/drift/*.jsonwith provenance and report fingerprints.lib/application/graph.ts,lib/domain/derived-graph.ts).impactcan answer "what scenarios are affected by this drift class?" viafindScenarioIdsByDriftClassandimpact --drift-class(lib/domain/graph-query.ts,lib/application/impact.ts,bin/tesseract.ts).tests/domain.spec.ts).Testing
npm run buildwhich completed successfully.npm test -- tests/domain.spec.ts tests/runtime-errors.spec.tsand all tests passed (15 passed, 0 failed) after iterative fixes.npm testtraces and test outputs during development while addressing failing expectations until the suite was green.Codex Task