Skip to content

Add journey-integrity gate: edge: resolver + Surface tag (ADR-0077) - #2

Merged
rdimitrov merged 1 commit into
mainfrom
rdimitrov/journey-integrity-adr-0077
Jul 1, 2026
Merged

Add journey-integrity gate: edge: resolver + Surface tag (ADR-0077)#2
rdimitrov merged 1 commit into
mainfrom
rdimitrov/journey-integrity-adr-0077

Conversation

@rdimitrov

@rdimitrov rdimitrov commented Jul 1, 2026

Copy link
Copy Markdown
Member

Implements the ac-trace side of a journey-integrity design (ADR-0077) developed with the original consuming repo — make the verify: gate prove journeys, not just layers.

Opt-in — nothing changes for a repo without .actrace.yml

Every new check is gated behind an optional .actrace.yml. Absent ⇒ zero Config ⇒ every feature off, so repos that don't opt in are unaffected. journey_integrity: true turns on the Surface/journey-proof gate; resolvers: maps a custom verify: prefix to a command.

What lands

  • config.go — the .actrace.yml loader. Missing file ⇒ zero value (no error); malformed ⇒ hard error (a typo mustn't silently disable a gate).
  • resolver.go — a generic verify-method prefix→command hook. edge:agentloop->files.GetFile is resolved by invoking the configured command with the raw token as one argv element, no shell (CWE-78/88); exit 0 = holds, non-zero = doesn't. A custom-prefix token with no configured resolver is a hard failure, never a silent no-op.
  • journey.go — the **Surface:** scenario tag + journey-proof gate. A user-facing scenario must carry ≥1 AC citing a journey proof, gated on location and substance:
    • a ui-e2e-realfd: spec that asserts on a real server response (waitForResponse), not DOM alone; or
    • a test/e2e/ Go test that is a real-cluster run (//go:build e2e, not synthetic, no idpfake).
    • A mock spec, a unit test, a faked-seam test/e2e/ test, or a demonstration/scenario/manual method can't satisfy it. Missing/unrecognised/ambiguous tags hard-fail. A pre-existing scenario grandfathers with journey-ok: only if it cites a tracked issue.

Tests

7 enforcing tests + config/token-filter/exit-code units. go test -race, go vet, golangci-lint run (gosec + exhaustive + …), and gofmt all clean. The FE ui-* vocabulary and existing gates are untouched.

Implements the ac-trace side of Atrium's ADR-0077 / issue #547 — make the
verify: gate prove journeys, not just layers. All of it is opt-in behind
an optional .actrace.yml, so a repo that ships no config (Airlock) is
unaffected.

- config.go: the .actrace.yml loader (zero value = every feature off).
- resolver.go: a generic verify-method prefix→command hook. A token like
  edge:agentloop->files.GetFile is resolved by invoking the configured
  command with the token as one argv element (no shell — CWE-78/88); a
  custom-prefix token with no configured resolver is a hard failure, never
  a silent no-op.
- journey.go: the **Surface:** scenario tag and the journey-proof gate. A
  user-facing scenario must carry >=1 AC citing a journey proof, gated on
  location AND substance: a ui-e2e-realfd: spec that asserts on a real
  server response (waitForResponse), or a test/e2e/ Go test that is a
  real-cluster run (//go:build e2e, not synthetic, no idpfake). Weak
  methods (demonstration/scenario/manual) are invalid on a user-facing AC;
  a pre-existing scenario grandfathers with a journey-ok: opt-out that must
  cite a tracked issue.

Enforcing tests (ADR-0077): TestADR_0077_EdgeVerifyRejectedWithoutResolver,
ResolverTokenPassedAsArgv, UserFacingScenarioRequiresJourneyProof,
JourneyProofIsLocationGated, JourneyProofRejectsFakedSeam,
UserFacingRejectsWeakMethods, GrandfatherOptOutRequiresIssue.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rdimitrov
rdimitrov merged commit 4674b94 into main Jul 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants