Skip to content

Services refuse to boot without their required config, and cluster-agent routes split one per file - #2082

Merged
gedaiu merged 4 commits into
mainfrom
review
Sep 17, 2026
Merged

gedaiu merged 4 commits into
mainfrom
review

Conversation

@gedaiu

@gedaiu gedaiu commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Every service now fails fast at startup when a required environment variable or database parameter is missing, instead of booting half-configured. requiredEnv and new enforce helpers in libs/shared do the checking, and pg-pool refuses a connection with missing parameters. Request body limits and the event drain timeout now come from shared constants, so the Floor, lore-api, the event-router and cluster-agent can no longer disagree about them.

cluster-agent's 235-line routes/cluster.ts is split into one file per endpoint under routes/cluster/ (agents, jobs, pods, pod listing, per-task tokens, restart), with the shared dependencies in cluster-route-deps.ts. The heartbeat loop and registrant were tidied along the way.

The branch also adds the collaborative-feature-planning spec.

🤖 Generated with Claude Code

…ling

- Centralized body size limits in shared constants for consistency across services.
- Updated agent-events, server, and lore-api to use new body limit constants.
- Introduced required environment variable functions to enforce deployment configurations.
- Enhanced database connection handling to ensure required parameters are supplied.
- Added tests for new enforce functions and improved error handling for missing environment variables.
- Specified default drain timeout for event processing across services.
- Implemented collaborative feature planning specification to enhance team input during feature drafting.
@lore-agent

lore-agent Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Lore is reviewing this PR — ca44a532-72a2-4875-bf13-e0ef018d6017.

Reply to any review comment to discuss or approve a fix (e.g. "ok, fix it"). Comment @lore review to re-run the review.

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown

Lore Spec Impact

Lore API unreachable (HTTP 504). This check could not run.

@lore-agent lore-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lore review — Changes suggested

Fix port bounds validation, clean up leftover PR review notes, and remove noisy heartbeat logs.

Must fix (1) · Consider (2) · Nits (1)

Reviewed by gemini-3-flash-preview

Reply to any review comment to discuss or approve a fix (e.g. "ok, fix it"). Comment @lore review to re-run the review.

Comment thread libs/shared/src/lib/required-env.ts Outdated
Comment thread apps/cluster-agent/src/events/claim/heartbeat-loop.ts Outdated
Comment thread apps/cluster-agent/src/transport/routes/cluster/pods.ts Outdated
Comment thread apps/cluster-agent/src/domain/cluster-deps.ts Outdated
requiredPort reads the whole value and refuses anything outside 1..65535;
enforceIntegerInterval takes its bounds as one IntegerInterval. The
heartbeat loop no longer logs every successful beat, and cluster routes
spread NO_HAPI_AUTH.

The three review todos are resolved in code: git_credential stays (the
agent image exchanges it at the credential broker), the file identity
store is gone (every cluster-agent, a laptop's included, keeps its
identity in a Secret), and cluster-agent now lints against inline object
parameter types, using CrdPair, Page/PageRequest and NamespacedName.

Spec and ADR links follow the moved cluster route tests, new tests are
linked, over-long comments are cut to one line, and mcp-server reads its
port in the transport layer.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@lore-agent lore-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lore review — Approved

Fast re-check of PR #2082: new commits address prior review comments and handle refactors for body size limits and environment variable handling appropriately.

Must fix (0) · Consider (0) · Nits (0)

Reviewed by gemini-3.1-flash-lite

Reply to any review comment to discuss or approve a fix (e.g. "ok, fix it"). Comment @lore review to re-run the review.

…oor pool test its DB config

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@lore-agent lore-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lore review — Approved

Re-check completed: changes appear compliant with repo conventions and linting; modularization of routes in cluster-agent is clean.

Must fix (0) · Consider (0) · Nits (0)

Reviewed by gemini-3.1-flash-lite

Reply to any review comment to discuss or approve a fix (e.g. "ok, fix it"). Comment @lore review to re-run the review.

@gedaiu
gedaiu merged commit ea494f1 into main Sep 17, 2026
31 checks passed
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