fix(harness): fence off retired project graph routes - #892
Conversation
Refs SAP-3089. Reject protected legacy requests before resolving scopes or retaining graph owners, while preserving shared discovery and session watcher coverage.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe harness retires legacy system-graph routes, limits graph invalidation to active scopes, and preserves workspace discovery through workflow scans and inventory. Tests now validate explicit workflow discovery, session lifecycle behavior, project identity, and symlink handling. ChangesLegacy graph retirement
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The legacy graph endpoints are retired without disrupting replacement discovery or ordinary sessions, and no merge-blocking risk is evident. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/review |
Review — PR #892 (round 1)1. The bundled UI still routes users into the retired endpoint — same version, no recovery
That scope-without- The PR body defers this to #893, but #892 is independently publishable — if it releases 2. Changeset is a plain
|
Hold the breaking release note for the client recovery layer and document the retired HTTP contract. Restore linked dependency exclusion coverage. Refs: SAP-3089
Review — PR #892 (round 2, delta since
|
Restore the breaking minor retirement changeset on the server layer. Check the pending client blocker before versioning, npm publishing and desktop releases so unrelated patch changesets cannot ship it alone. Refs: SAP-3089
|
/review |
Review — PR #892 (round 3, delta since
|
Refs: SAP-3089
Provide the credentialsFilePath export used by the new shared credential observer, pointing it inside each fixture's temporary directory. This repairs the four CI startup failures after the main-branch auth integration. Refs: SAP-3089
Primary change type
Problem and motivation
Current Studio already uses durable Agent Map state, but stale System Graph requests could still resolve scopes and retain graph watcher/inventory work. A second topology authority remained reachable during identity failures.
Summary and scope
Return an authenticated 410
legacy_graph_retiredbefore old graph reads, refreshes or navigation resolve a scope. Retain no current-server legacy graph owners and avoid their inventory invalidation when no graph consumer exists. Shared discovery and ordinary session watchers continue to operate.This is the server layer of SAP-3089. The graph implementation stays unreachable until SAP-3091; the next layer (#893) handles browser identity recovery and retirement evidence.
Release dependency: #892 must not be released ahead of #893. The server-only diff still contains the older browser fallback during catalog failure; #893 supplies its unavailable-map recovery. A checked-in
.release-blockedfile makespnpm version-packagesandpnpm releasefail before changing versions, building or publishing. The Release PR, npm Publish and Desktop Release workflows also run the check immediately after checkout. #893 removes the blocker with the client recovery. The breaking minor changeset stays in this server layer, so unrelated pending patches cannot turn the endpoint retirement into an unannounced patch.Related work
Related issue or discussion:
https://linear.app/sapiom/issue/SAP-3089
Validation
Current head:
5870d0f5, including mainb460c9aa.The CI repair reproduces and fixes four startup failures also present on current main: the definition-list fixture omitted
credentialsFilePathfrom its auth mock. The mock now points the credential observer at a fixture-owned temporary path. All 32 related auth, observer, discovery and wiring tests passed locally after the fix. The combined stack also passed Harness build/typecheck and 19 authority/session-tab browser tests, including the newer MCP restart flow.The release check passed all 178 script tests and nine desktop release-tag tests. Actual server-only
pnpm release:check,pnpm version-packagesandpnpm releaseeach exit 1 with the required-client explanation before downstream work. All three release workflows check immediately after checkout; desktop publication depends on the guarded prepare job. The full Changesets release-plan API confirms the breaking minor wins over pending patches. No versions or published changelogs were changed.Tests and documentation
The wiring test proves protected 410 responses, zero legacy reads/refreshes/watchers, and unchanged ordinary sessions for root and descendant scopes. Existing discovery tests now use their shared scan/session consumers and retain cold inventory, renames/deletions, latest-scan budgets, repository boundaries, final-lease retirement and symlink coverage. The shipped README and HTTP contract mark all three endpoints as retired and document migration to durable project IDs, map reads and exact node navigation. This layer includes the breaking minor changeset and an executable release check. The next stack layer supplies client recovery, removes the release blocker and records the complete authority matrix and packaged evidence.
Compatibility and release impact
GET /api/workspaces/:workspaceKey/system-graph,POST /api/workspaces/:workspaceKey/system-graph/refresh, andGET /api/workspaces/:workspaceKey/system-graph/navigationroutes now return authenticated410witherror: "legacy_graph_retired". Migrate toGET /api/projects/:projectId/agent-map/workspaceand exact node implementation navigation using server-issued project IDs. The matching browser recovery in fix(harness): recover Agent Map identity without legacy fallback #893 must ship in the same release..changeset/quiet-project-map-authority.mdas a breaking Harness minor with all three retired routes,legacy_graph_retiredand migration guidance. The complete pending changeset queue, including the pending Harness patches, resolves to 0.17.0..release-blockedprevents the configured versioning and release entrypoints from proceeding until fix(harness): recover Agent Map identity without legacy fallback #893 is included.Security
will follow the
Security Policy for
private reporting.
AI assistance
Codex researched and implemented the change. An independent agent reviewed the authority and session boundaries; build, typecheck, lint, integration/browser tests and packaged smoke checks verified the combined stack.
Checklist
CONTRIBUTING.md, and this contribution follows the direct-PR or issue-first policy.any N/A checks above.