feat(harness): migrate graphs to package inventory (SAP-2955) - #731
feat(harness): migrate graphs to package inventory (SAP-2955)#731ynadge wants to merge 9 commits into
Conversation
Define the versioned @sapiom/agent inventory contract, move Studio graph identity enrichment behind it, and join path-bearing navigation through an atomic revisioned sidecar. Closes: SAP-2955
Refs: SAP-2955
Review — PR #731 (round 1)1. Unimplemented protocol-1 surface is a permanent public commitment
Failure scenario: a consumer builds against Keep protocol 1 to what is emitted and consumed today; add the fields with the code that 2. Identity enrichment triggers one whole-graph rebuild per agent, undebounced
Failure scenario: cold-opening a workspace with N registry agents — the normal first open, 3. The changeset tells an
|
Refs: SAP-2955
|
Addressed all three review items in
Fresh verification: Agent 181/181 + build; Harness graph/inventory focused 128/128 + typecheck/build; lint has 0 errors (one pre-existing untouched warning); terminology, Changesets status, formatting, and diff check pass. Please re-review this head. |
Review — PR #731 (round 2, delta since
|
Refs: SAP-2955
|
Addressed the remaining progressive-batching follow-up in
Fresh verification: provider/builder tests 57/57, Harness typecheck, lint (0 errors; one pre-existing warning), production build, Prettier, and |
|
/review |
Review — PR #731 (round 3, delta since
|
Refs: SAP-2955
|
Cleared the remaining test nit in |
|
/review |
Review — PR #731 (round 4, delta since
|
Refs: SAP-2955
|
Cleared the timing-flake nit in |
|
/review |
Review — PR #731 (round 5, delta since
|
|
Fixed the full Playwright regression in |
|
/review |
Review — PR #731 (round 6, delta since
|
# Conflicts: # packages/harness/web/e2e/mobile.spec.ts # packages/harness/web/e2e/mock-navigation.ts
Separate cross-agent graph evidence from the package inventory contract so deterministic handoff analysis can define and validate package-level relationships independently. Refs: SAP-2955
|
/review |
Review — PR #731 (round 7, delta since
|
|
/review |
Review — PR #731 (round 8)No delta. The PR head ( Still open from round 7
Verdict: All findings from rounds 1–7 resolved or obsoleted. Approve once the |
|
Superseded by #750, which reconstructs SAP-2955 from current I am closing this PR only. Its head branch is intentionally being left intact because #732 still uses that branch as its base; #732 has not been edited, retargeted, rebased, or pushed as part of this work. |
Primary change type
Problem and motivation
The released V0 workspace graph derives identity and navigation from Harness-private registry rows. That does not provide a versioned package contract, makes source identity work part of graph construction, and lets the browser reconstruct path-bearing navigation from mutable workflow state.
This change establishes package inventory as the node/identity contract: which agents exist, their stable identities, and their package-relative locations. Deterministic static graph and package-wide data-flow evidence are explicitly separate concerns and will use independently versioned package-level contracts.
Summary and scope
@sapiom/agent, separate fromAgentManifestandMANIFEST_PROTOCOL.agentKey -> workflowPathresolver atomically under one numeric graph revision.GET /api/workspaces/:workspaceKey/system-graph/navigationsidecar and make browser navigation fail closed unless workspace, revision, and lifecycle all match.Intentionally out of scope: package-wide data-flow extraction, static graph evidence contracts, agent input/output extraction, TypeScript Program/TypeChecker analysis, registry-unlinked discovery, bundle inventory emission, backend ingestion, and new graph edge kinds. Those remain for later stacked work.
Related work
Related issue: SAP-2955
Follow-up: SAP-2956
Validation
Tests and documentation
Added contract fixtures, provider/cache/invalidation tests, builder/store/router integration tests, strict browser parser and resolver tests, request-race regressions, mock parity coverage, and mounted-view Playwright coverage for batched graph invalidations. Updated
packages/harness/docs/workspace-system-graph.mdwith the protected revision-matched navigation sidecar and background identity lifecycle.Compatibility and release impact
@sapiom/agentpackage-inventory API and a boot-token-protected Harness navigation endpoint. Existing AgentManifest protocol, SystemGraph JSON shape, V0 graph layout, and invocation edge semantics remain unchanged.@sapiom/agentand@sapiom/harness; dependent release propagation follows the existing Changesets policy.mainwas merged into this shared stack base without rewriting its published history.Security
AI assistance
Codex implemented and reviewed the contract boundary amendment, mainline conflict resolutions, SDK/Harness behavior, tests, documentation, and final diff. The final branch was validated from an isolated worktree.
Checklist
CONTRIBUTING.md.