Skip to content

fix(factory): bound routine listings and expose permit diagnostics - #6973

Merged
jomcgi merged 3 commits into
mainfrom
fix/factory-permit-diagnostics
Oct 16, 2026
Merged

jomcgi merged 3 commits into
mainfrom
fix/factory-permit-diagnostics

Conversation

@jomcgi

@jomcgi jomcgi commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Unfiltered routine-job MCP reads return INVALID_ARGUMENT in the connector while due-only (19 rows) and empty-kind reads succeed. The existing adapter loads and returns unbounded full rows, including payloads and summaries. Bound the response to a page (20 default, 50 maximum), omit payloads/free-form summaries, expose next_offset, and run the database read off the event loop. The connector does not expose its underlying rejection reason, so result size is the supported hypothesis, not a proven transport root cause.

Add operator-only factory_permit_diagnostics for up to twenty exact permit IDs. It uses explicit SELECT projections for reservations, session bindings/status, pending claims, stored supervision observations, DBOS status and routine leases. It excludes prompts, results, payloads, credentials and raw evidence. It does not contact guests or settle/rearm work. Persisted observations are not fresh cessation proof and never authorize recovery.

Validation: 266 local tests passed across permit supervision, factory MCP, agent MCP, routine-job behavior and catalogue compliance. Regressions cover SELECT-only access, redaction, authorization before reads, strict permit ID schema, off-loop execution, page navigation and a 100 KB free-text status. ci lint, Ruff, diff check and source ratchet passed. Independent whole-diff review found no remaining blockers after metadata string bounds were added. Real Postgres pagination passed in hosted CI. Exact-head pr-checks passed: Executed 103 out of 335 tests, all 335 passed. The HTTP smoke target passed on its automatic second attempt after a healthz ReadTimeout; no manual rerun. Image builds and repository gates passed, with zero deployment-manifest changes. BuildBuddy run.

Hosted CI reproduced an existing midnight fixture defect: the test expected today's $0.40 charge even when its paid turn was seeded twenty minutes earlier on the previous UTC day. Included the independently reviewed test-only correction to assert the paid turn's recorded date. No recovery implementation from #6972 is included.

Current head: cb51255e237f25079d53bad8e32ffe2ba0f8ce8c.

Activation and recovery remain separate. No live settings, credentials, budgets, limits, holds or permits changed. Receipt 822 and recovery draft #6972 remain held. The five live permits still need exact diagnostic evidence after a separately approved deployment before any recovery decision.

@jomcgi

jomcgi commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Helm Manifest Diff

No manifest changes detected across 17 application(s).

@jomcgi
jomcgi marked this pull request as ready for review October 16, 2026 04:58
@jomcgi
jomcgi added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 6c58531 Oct 16, 2026
1 check passed
@jomcgi
jomcgi deleted the fix/factory-permit-diagnostics branch October 16, 2026 05:05
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