Skip to content

chore(remove): delete Consensus review and Model Router features#1583

Merged
OneStepAt4time merged 1 commit intodevelopfrom
chore/1577-remove-consensus-router
Apr 10, 2026
Merged

chore(remove): delete Consensus review and Model Router features#1583
OneStepAt4time merged 1 commit intodevelopfrom
chore/1577-remove-consensus-router

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

  • Delete src/consensus.ts and src/model-router.ts — aspirational features with no active users
  • Remove consensus routes (POST /v1/sessions/:id/consensus, GET /v1/consensus/:id), model router routes, in-memory state, and prune interval from src/server.ts
  • Delete exclusive test files: consensus-734.test.ts, consensus-1422.test.ts, model-router-743.test.ts
  • Update CLAUDE.md architecture listing

Net: -668 lines, 0 new code.

Aegis version

Developed with: v0.3.2-alpha

Test plan

  • npx tsc --noEmit — passes
  • npm run build — passes
  • npm test — 143 files passed, 2585 tests passed, 0 failures
  • CI passes on this branch

Closes #1577

Generated by Hephaestus (Aegis dev agent)

@OneStepAt4time
Copy link
Copy Markdown
Owner Author

🔧 PR #1583 ready for review: chore(remove): delete Consensus review and Model Router features (#1577). CI CLEAN. Please review.

Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Removing unused features per project decision. CI green.

Remove src/consensus.ts, src/model-router.ts, and all associated
routes, state, handlers, and tests. These aspirational features
have no active users and do not belong to the core value proposition.

Closes #1577

Generated by Hephaestus (Aegis dev agent)
@OneStepAt4time OneStepAt4time force-pushed the chore/1577-remove-consensus-router branch from 0b771c9 to 1d9c5e2 Compare April 10, 2026 07:10
@OneStepAt4time OneStepAt4time merged commit 47971db into develop Apr 10, 2026
10 checks passed
@OneStepAt4time OneStepAt4time deleted the chore/1577-remove-consensus-router branch April 10, 2026 07:12
OneStepAt4time added a commit that referenced this pull request Apr 10, 2026
…routes/

Rebase onto latest origin/develop and re-apply the refactoring.

Extract route handlers from the monolithic 2449-line server.ts into
focused Fastify plugins under src/routes/:
- health.ts: health, metrics, alerts, swarm, handshake, audit
- auth.ts: key management, verification, SSE tokens, rotation
- sessions.ts: all session CRUD, interaction, hooks, SSE, batch
- events.ts: global SSE event stream
- pipelines.ts: pipeline CRUD
- templates.ts: session template CRUD
- diagnostics.ts: diagnostics, tools, webhooks, channels, latency

Also extract rate-limit utilities into src/rate-limit.ts to avoid
circular imports between server.ts and route plugins.

Incorporates all develop changes since branch divergence:
- AuditLogger + AlertManager initialization (#1418, #1419)
- Request ID correlation (#1416)
- /metrics auth (#1557)
- KEY_EXPIRED error code (#1403)
- claudeCommand RCE prevention (#1393)
- ?secret= redaction (#1393)
- Pipeline persistence (#1424)
- Removes consensus/model-router references (deleted in #1583)

server.ts reduced from 2449 to ~580 lines (bootstrap + middleware).

Generated by Hephaestus (Aegis dev agent)
OneStepAt4time added a commit that referenced this pull request Apr 10, 2026
…routes/

Rebase onto latest origin/develop and re-apply the refactoring.

Extract route handlers from the monolithic 2449-line server.ts into
focused Fastify plugins under src/routes/:
- health.ts: health, metrics, alerts, swarm, handshake, audit
- auth.ts: key management, verification, SSE tokens, rotation
- sessions.ts: all session CRUD, interaction, hooks, SSE, batch
- events.ts: global SSE event stream
- pipelines.ts: pipeline CRUD
- templates.ts: session template CRUD
- diagnostics.ts: diagnostics, tools, webhooks, channels, latency

Also extract rate-limit utilities into src/rate-limit.ts to avoid
circular imports between server.ts and route plugins.

Incorporates all develop changes since branch divergence:
- AuditLogger + AlertManager initialization (#1418, #1419)
- Request ID correlation (#1416)
- /metrics auth (#1557)
- KEY_EXPIRED error code (#1403)
- claudeCommand RCE prevention (#1393)
- ?secret= redaction (#1393)
- Pipeline persistence (#1424)
- Removes consensus/model-router references (deleted in #1583)

server.ts reduced from 2449 to ~580 lines (bootstrap + middleware).

Generated by Hephaestus (Aegis dev agent)
OneStepAt4time added a commit that referenced this pull request Apr 10, 2026
…routes/

Rebase onto latest origin/develop and re-apply the refactoring.

Extract route handlers from the monolithic 2449-line server.ts into
focused Fastify plugins under src/routes/:
- health.ts: health, metrics, alerts, swarm, handshake, audit
- auth.ts: key management, verification, SSE tokens, rotation
- sessions.ts: all session CRUD, interaction, hooks, SSE, batch
- events.ts: global SSE event stream
- pipelines.ts: pipeline CRUD
- templates.ts: session template CRUD
- diagnostics.ts: diagnostics, tools, webhooks, channels, latency

Also extract rate-limit utilities into src/rate-limit.ts to avoid
circular imports between server.ts and route plugins.

Incorporates all develop changes since branch divergence:
- AuditLogger + AlertManager initialization (#1418, #1419)
- Request ID correlation (#1416)
- /metrics auth (#1557)
- KEY_EXPIRED error code (#1403)
- claudeCommand RCE prevention (#1393)
- ?secret= redaction (#1393)
- Pipeline persistence (#1424)
- Removes consensus/model-router references (deleted in #1583)

server.ts reduced from 2449 to ~580 lines (bootstrap + middleware).

Generated by Hephaestus (Aegis dev agent)
OneStepAt4time added a commit that referenced this pull request Apr 10, 2026
…routes/

Rebase onto latest origin/develop and re-apply the refactoring.

Extract route handlers from the monolithic 2449-line server.ts into
focused Fastify plugins under src/routes/:
- health.ts: health, metrics, alerts, swarm, handshake, audit
- auth.ts: key management, verification, SSE tokens, rotation
- sessions.ts: all session CRUD, interaction, hooks, SSE, batch
- events.ts: global SSE event stream
- pipelines.ts: pipeline CRUD
- templates.ts: session template CRUD
- diagnostics.ts: diagnostics, tools, webhooks, channels, latency

Also extract rate-limit utilities into src/rate-limit.ts to avoid
circular imports between server.ts and route plugins.

Incorporates all develop changes since branch divergence:
- AuditLogger + AlertManager initialization (#1418, #1419)
- Request ID correlation (#1416)
- /metrics auth (#1557)
- KEY_EXPIRED error code (#1403)
- claudeCommand RCE prevention (#1393)
- ?secret= redaction (#1393)
- Pipeline persistence (#1424)
- Removes consensus/model-router references (deleted in #1583)

server.ts reduced from 2449 to ~580 lines (bootstrap + middleware).

Generated by Hephaestus (Aegis dev agent)
OneStepAt4time added a commit that referenced this pull request Apr 10, 2026
…routes/

Rebase onto latest origin/develop and re-apply the refactoring.

Extract route handlers from the monolithic 2449-line server.ts into
focused Fastify plugins under src/routes/:
- health.ts: health, metrics, alerts, swarm, handshake, audit
- auth.ts: key management, verification, SSE tokens, rotation
- sessions.ts: all session CRUD, interaction, hooks, SSE, batch
- events.ts: global SSE event stream
- pipelines.ts: pipeline CRUD
- templates.ts: session template CRUD
- diagnostics.ts: diagnostics, tools, webhooks, channels, latency

Also extract rate-limit utilities into src/rate-limit.ts to avoid
circular imports between server.ts and route plugins.

Incorporates all develop changes since branch divergence:
- AuditLogger + AlertManager initialization (#1418, #1419)
- Request ID correlation (#1416)
- /metrics auth (#1557)
- KEY_EXPIRED error code (#1403)
- claudeCommand RCE prevention (#1393)
- ?secret= redaction (#1393)
- Pipeline persistence (#1424)
- Removes consensus/model-router references (deleted in #1583)

server.ts reduced from 2449 to ~580 lines (bootstrap + middleware).

Generated by Hephaestus (Aegis dev agent)
OneStepAt4time added a commit that referenced this pull request Apr 10, 2026
…hot, events, stats (#1399)

- Add requireOwnership() to /v1/sessions/:id/metrics
- Add requireOwnership() to /v1/sessions/:id/tools
- Add requireOwnership() to /v1/sessions/:id/latency
- Add requireOwnership() to /v1/sessions/:id/screenshot
- Add requireOwnership() to /v1/sessions/:id/events
- Scope /v1/sessions/stats by caller ownership for non-master keys
- Consensus route removed (already removed in #1583)
OneStepAt4time added a commit that referenced this pull request Apr 10, 2026
…hot, events, stats (#1399)

- Add requireOwnership() to /v1/sessions/:id/metrics
- Add requireOwnership() to /v1/sessions/:id/tools
- Add requireOwnership() to /v1/sessions/:id/latency
- Add requireOwnership() to /v1/sessions/:id/screenshot
- Add requireOwnership() to /v1/sessions/:id/events
- Scope /v1/sessions/stats by caller ownership for non-master keys
- Consensus route removed (already removed in #1583)
OneStepAt4time added a commit that referenced this pull request Apr 10, 2026
…hot, events, stats (#1399) (#1607)

- Add requireOwnership() to /v1/sessions/:id/metrics
- Add requireOwnership() to /v1/sessions/:id/tools
- Add requireOwnership() to /v1/sessions/:id/latency
- Add requireOwnership() to /v1/sessions/:id/screenshot
- Add requireOwnership() to /v1/sessions/:id/events
- Scope /v1/sessions/stats by caller ownership for non-master keys
- Consensus route removed (already removed in #1583)
OneStepAt4time pushed a commit that referenced this pull request Apr 10, 2026
…1583)

Remove all documentation references to deleted features (PR #1583).

REMOVED FEATURES:
- Consensus Review endpoints (/v1/sessions/:id/consensus, /v1/consensus/:id)
- Model Router config and tiered routing

FILES CHANGED:
- README.md: Remove consensus/model router from features list
- docs/advanced.md: Remove Consensus Review section
- docs/api-reference.md: Remove consensus endpoints; remove consensus.completed SSE event
- docs/architecture.md: Remove consensus.ts and model-router.ts from module overview
- docs/getting-started.md: Update advanced features reference
- docs/enterprise.md: Remove modelRouter from config example
- docs/enterprise/01-architecture.md: Remove consensus/model-router; mark findings RESOLVED
- docs/enterprise/03-testing-observability.md: Remove model-router.ts from thin-tests list
- docs/enterprise/05-enterprise-roadmap.md: Remove E4-1 (consensus); update M-E4 scope
- docs/enterprise/index.md: Remove consensus reliability finding

RESOLVED IN v0.3.3:
- P-3 (PipelineManager persistence): PR #1585
- P-1 (Pipeline stage timeout): PR #1606
- CON-1 (Consensus): PR #1583 (feature removed)

NOTE: openapi.yaml still contains /consensus endpoints — separate update needed.
OneStepAt4time added a commit that referenced this pull request Apr 10, 2026
…routes/

Rebase onto latest origin/develop and re-apply the refactoring.

Extract route handlers from the monolithic 2449-line server.ts into
focused Fastify plugins under src/routes/:
- health.ts: health, metrics, alerts, swarm, handshake, audit
- auth.ts: key management, verification, SSE tokens, rotation
- sessions.ts: all session CRUD, interaction, hooks, SSE, batch
- events.ts: global SSE event stream
- pipelines.ts: pipeline CRUD
- templates.ts: session template CRUD
- diagnostics.ts: diagnostics, tools, webhooks, channels, latency

Also extract rate-limit utilities into src/rate-limit.ts to avoid
circular imports between server.ts and route plugins.

Incorporates all develop changes since branch divergence:
- AuditLogger + AlertManager initialization (#1418, #1419)
- Request ID correlation (#1416)
- /metrics auth (#1557)
- KEY_EXPIRED error code (#1403)
- claudeCommand RCE prevention (#1393)
- ?secret= redaction (#1393)
- Pipeline persistence (#1424)
- Removes consensus/model-router references (deleted in #1583)

server.ts reduced from 2449 to ~580 lines (bootstrap + middleware).

Generated by Hephaestus (Aegis dev agent)
OneStepAt4time pushed a commit that referenced this pull request Apr 12, 2026
…1583)

Remove all documentation references to deleted features (PR #1583).

REMOVED FEATURES:
- Consensus Review endpoints (/v1/sessions/:id/consensus, /v1/consensus/:id)
- Model Router config and tiered routing

FILES CHANGED:
- README.md: Remove consensus/model router from features list
- docs/advanced.md: Remove Consensus Review section
- docs/api-reference.md: Remove consensus endpoints; remove consensus.completed SSE event
- docs/architecture.md: Remove consensus.ts and model-router.ts from module overview
- docs/getting-started.md: Update advanced features reference
- docs/enterprise.md: Remove modelRouter from config example
- docs/enterprise/01-architecture.md: Remove consensus/model-router; mark findings RESOLVED
- docs/enterprise/03-testing-observability.md: Remove model-router.ts from thin-tests list
- docs/enterprise/05-enterprise-roadmap.md: Remove E4-1 (consensus); update M-E4 scope
- docs/enterprise/index.md: Remove consensus reliability finding

RESOLVED IN v0.3.3:
- P-3 (PipelineManager persistence): PR #1585
- P-1 (Pipeline stage timeout): PR #1606
- CON-1 (Consensus): PR #1583 (feature removed)

NOTE: openapi.yaml still contains /consensus endpoints — separate update needed.
OneStepAt4time added a commit that referenced this pull request Apr 12, 2026
…1583) (#1709)

Remove all documentation references to deleted features (PR #1583).

REMOVED FEATURES:
- Consensus Review endpoints (/v1/sessions/:id/consensus, /v1/consensus/:id)
- Model Router config and tiered routing

FILES CHANGED:
- README.md: Remove consensus/model router from features list
- docs/advanced.md: Remove Consensus Review section
- docs/api-reference.md: Remove consensus endpoints; remove consensus.completed SSE event
- docs/architecture.md: Remove consensus.ts and model-router.ts from module overview
- docs/getting-started.md: Update advanced features reference
- docs/enterprise.md: Remove modelRouter from config example
- docs/enterprise/01-architecture.md: Remove consensus/model-router; mark findings RESOLVED
- docs/enterprise/03-testing-observability.md: Remove model-router.ts from thin-tests list
- docs/enterprise/05-enterprise-roadmap.md: Remove E4-1 (consensus); update M-E4 scope
- docs/enterprise/index.md: Remove consensus reliability finding

RESOLVED IN v0.3.3:
- P-3 (PipelineManager persistence): PR #1585
- P-1 (Pipeline stage timeout): PR #1606
- CON-1 (Consensus): PR #1583 (feature removed)

NOTE: openapi.yaml still contains /consensus endpoints — separate update needed.

Co-authored-by: Argus <argus@openclaw.ai>
OneStepAt4time pushed a commit that referenced this pull request Apr 13, 2026
OpenAPI spec still referenced removed Consensus Review endpoints:
- DELETE /v1/sessions/{id}/consensus (POST)
- DELETE /v1/consensus/{id} (GET)

These endpoints were removed from the codebase in PR #1583 but the OpenAPI
spec was not updated. Also removes the now-orphaned 'Consensus' tag.
OneStepAt4time pushed a commit that referenced this pull request Apr 13, 2026
OpenAPI spec still referenced removed Consensus Review endpoints:
- DELETE /v1/sessions/{id}/consensus (POST)
- DELETE /v1/consensus/{id} (GET)

These endpoints were removed from the codebase in PR #1583 but the OpenAPI
spec was not updated. Also removes the now-orphaned 'Consensus' tag.
OneStepAt4time added a commit that referenced this pull request Apr 13, 2026
OpenAPI spec still referenced removed Consensus Review endpoints:
- DELETE /v1/sessions/{id}/consensus (POST)
- DELETE /v1/consensus/{id} (GET)

These endpoints were removed from the codebase in PR #1583 but the OpenAPI
spec was not updated. Also removes the now-orphaned 'Consensus' tag.

Co-authored-by: Argus <argus@openclaw.ai>
OneStepAt4time added a commit that referenced this pull request Apr 14, 2026
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.

1 participant