docs: Update architecture docs for anchor mechanism [doc-updater] - #1266
Conversation
Update documentation to reflect changes from 669809e: - README.md: Add anchor recovery guide to documentation table - docs/architecture/README.md: Add agent-anchor.schema.json to schemas list and anchor write-scoping to access controls - docs/architecture/orchestrator.md: Add anchor and progress API endpoints to the orchestrator API reference Triggered by: #1260 (Add agent anchor mechanism for post-compaction recovery) Authored-by: egg
There was a problem hiding this comment.
Documentation Accuracy Issues
This PR documents API endpoints that don't match the actual implementation. For a docs PR whose stated purpose is filling "remaining gaps in the architecture overview," incorrect endpoint references create confusion rather than closing gaps.
Blocking
1. GET /pipelines/{id}/progress/alerts does not exist — the real path is /pipelines/{id}/health/alerts
docs/architecture/orchestrator.md line 401 documents:
GET /pipelines/{id}/progress/alerts - List active health alerts
The actual route is defined in orchestrator/routes/health.py:181:
@health_bp.route("/pipelines/<pipeline_id>/health/alerts", methods=["GET"])The health_bp blueprint has prefix /api/v1, making the real path /api/v1/pipelines/{id}/health/alerts. There is no /progress/alerts route anywhere in the progress blueprint or any other blueprint.
Placing this under the "progress" subsection in the docs and using the wrong URL path means anyone following the documentation will get 404s.
Fix: Change to GET /pipelines/{id}/health/alerts and move it out of the progress group, or place it under a dedicated health subsection (which already exists earlier in the same file under health endpoints, where it arguably belongs instead of being duplicated here).
2. GET /anchors/ endpoint does not exist
docs/architecture/orchestrator.md line 408 documents:
GET /anchors/ - List all anchors for a pipeline (requires ?pipeline_id=)
No such route exists in orchestrator/routes/anchors.py. The only routes registered on the anchors_bp blueprint are:
/<agent_id>(GET/POST/DELETE)/team/<pipeline_id>(GET)/gc/<pipeline_id>(POST)
There is no root GET / handler. This documents a phantom endpoint.
Fix: Remove this line, or implement the endpoint if it's intended functionality.
3. POST /anchors/gc/{pipeline_id} endpoint exists but is not documented
orchestrator/routes/anchors.py:280 defines a garbage collection endpoint:
@anchors_bp.route("/gc/<pipeline_id>", methods=["POST"])
def gc_anchors(pipeline_id: str):This endpoint handles anchor cleanup for completed/failed pipelines (archiving or setting TTLs). It's not mentioned in the documentation added by this PR.
Fix: Add POST /anchors/gc/{pipeline_id} to the anchors section.
Summary
Two of the five documented anchor/progress endpoints have incorrect paths or don't exist, and one real endpoint is omitted. The README and architecture/README changes are accurate and fine. The orchestrator.md endpoint documentation needs corrections before merge.
— Authored by egg
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Fix health alerts endpoint: /progress/alerts → /health/alerts
(matches orchestrator/routes/health.py:181)
- Remove phantom GET /anchors/ endpoint (no such route exists)
- Add missing POST /anchors/gc/{pipeline_id} endpoint
(defined in orchestrator/routes/anchors.py:280)
There was a problem hiding this comment.
Agreed. All three issues fixed in 1210e6c:
- Health alerts path: Changed
GET /pipelines/{id}/progress/alerts→GET /pipelines/{id}/health/alertsand moved it next to the existing health endpoint (matchesorchestrator/routes/health.py:181). - Phantom
GET /anchors/: Removed — no such route exists inorchestrator/routes/anchors.py. - Missing GC endpoint: Added
POST /anchors/gc/{pipeline_id}(matchesorchestrator/routes/anchors.py:280).
— Authored by egg
There was a problem hiding this comment.
Re-review: previous feedback fully addressed in 1210e6c. Health alerts path corrected, phantom endpoint removed, GC endpoint added. No agent-mode design concerns — documentation-only changes.
— Authored by egg
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Re-review: All Issues Fixed
Verified the three blocking issues from the previous review against the implementation:
- Health alerts path — Fixed.
GET /pipelines/{id}/health/alertsnow matchesorchestrator/routes/health.py:181and is positioned next to the existingGET /pipelines/{id}/healthendpoint. - Phantom
GET /anchors/— Removed. Only the five real endpoints are documented. - Missing GC endpoint — Added.
POST /anchors/gc/{pipeline_id}matchesorchestrator/routes/anchors.py:280.
Cross-checked all documented endpoints against blueprint registrations:
health_bpprefix/api/v1→ health/alerts path correctprogress_bpprefix/api/v1/pipelines→ progress GET/POST paths correctanchors_bpprefix/api/v1/anchors→ all five anchor paths correct
README link target (docs/guides/anchor-recovery.md) and schema reference (.egg/schemas/agent-anchor.schema.json) both exist. Access control description matches the enforcement documented in anchor-recovery.md:141-143.
No issues found.
— Authored by egg
|
egg review completed. View run logs 4 previous review(s) hidden. |
Update documentation to reflect the agent anchor mechanism added in #1260:
anchor-recovery.mdguide.agent-anchor.schema.jsonto the Schemas section, and added anchor write-scoping (agents limited to their own anchor file viaAGENT_ANCHOR_ID) to the Access Control section./api/v1/anchors/*) and progress API endpoints to the Orchestrator API reference section.The feature itself was already well-documented in
docs/guides/anchor-recovery.md,shared/egg_anchor/README.md,docs/reference/orchestrator-cli.md, anddocs/development/STRUCTURE.md— all updated as part of the original PR. These changes fill the remaining gaps in the architecture overview and top-level README discoverability.Triggered by: #1260
Test plan:
.egg/schemas/agent-anchor.schema.jsonorchestrator/routes/anchors.pyAuthored-by: egg