feat(harness): define immutable Agent Map revisions - #783
Conversation
Establish the canonical architecture digest protocol, strict revision and approval evidence contracts, pure materialization and chain validation, and replay boundary fixtures without adding persistence or transport behavior. Closes: SAP-3062
Review — PR #783: define immutable Agent Map revisionsNo confidentiality findings: the changeset, JSDoc, and test fixtures are provider-neutral 1. Approval evidence never binds the human message to what was approved
Failure: a planner session opens, the user types "let's map this out" at 2. Seven tests assert their own parameters and exercise no production code
Both 3. Deterministic failures are returned with
|
Enforce approval chronology, exercise real confirmation boundary logic, classify corrupt chains as reread-required, and clarify the public contract changeset. Refs: SAP-3062
|
Addressed all four findings in c904714:
Fresh verification after the fixes:
|
Follow-up review — PR #783 (delta
|
Carry both proposal sources through the confirmation boundary so unrelated operations do not invalidate an otherwise current confirmation. Refs: SAP-3062
|
Fixed the follow-up boundary finding in 1d97f86. The
Added a direct production-helper regression for the unrelated-operation-first case. Fresh verification on this commit: focused suite 90/90, full harness suite 206 files / 3,367 tests, performance suite 10/10, typecheck, and lint all passed. |
|
/review |
Follow-up review — PR #783 (delta
|
Document that operation-first classification accepts only a transaction-validated operation against the one current proposal, while post-confirmation operations require exact-source rebasing. Refs: SAP-3062
|
Resolved the final semantics call in 044c266 by taking the review's documented-precondition option and restoring SAP-3062's frozen single-proposal rule. A project has one current mutable proposal. Therefore the Once confirmation commits, the old proposal is closed by the immutable revision. Only an in-flight operation based on that exact just-confirmed This also removes the structurally duplicated union variant noted in the nit. Fresh focused tests (89/89), typecheck, lint, and diff checks pass on the resolved contract; the full 3,366-test and 10-test performance runs cover the same executable state (the final delta changes only the precondition documentation and restores the already-verified original branch/test fixture). |
|
/review |
Follow-up review — PR #783 (delta
|
Summary
Defines the immutable Agent Map architecture boundary needed to promote an E2 proposal into an approved revision. The change introduces public revision, digest, approval-evidence, human-message receipt, confirmation request/result, and bounded failure contracts without adding confirmation persistence or transport behavior.
Changes
@sapiom/harnesswith a minor changeset.Review refinements
Scope
This PR intentionally adds no aggregate migration, durable revision store, confirmation transaction, MCP/REST route, session mutation, or UI behavior.
Handoff
AgentMapGraphDigestandAgentMapRevisionRefforArchitectureSourceRef; it should not define competing source identity shapes.Testing
@sapiom/harnesssuite: 206 files / 3,366 tests passedpnpm --filter @sapiom/harness typecheckpnpm --filter @sapiom/harness lintpnpm --filter @sapiom/harness buildpnpm terminology:checkRelated
Closes: SAP-3062
https://linear.app/sapiom/issue/SAP-3062/api-define-immutable-revisions-and-approval-evidence