feat(coding): inspect and retry Depot CI through the edge - #2413
Conversation
There was a problem hiding this comment.
Changes requested: The edge lacks independent run/repository authorization, page-boundary redaction leaks secret fragments, and the required live acceptance receipt is outstanding.
Warning
Changes requested · head ba7620e · 3 findings: 1 major, 2 minor
| Severity | Finding | Where |
|---|---|---|
| major | F1 Bind the edge request to an authenticated run and repository | deploy/cloudflare/depotCi.ts:69 |
| minor | F2 Spec contradiction — depot-ci.md item 3: page-local redaction exposes split credentials | deploy/cloudflare/depotCi.ts:148 |
| minor | F3 Provide the live failed-check diagnosis and failed-only retry receipt | docs/reference/specs/depot-ci.md:32 |
Full review
F1 (major, high confidence): The edge authenticates a shared bearer, then trusts the caller-supplied repo; it never verifies which run or repository the caller represents. A holder of that bearer can name any repository accessible to the organization token, inspect its workflows and request failed-only retries. Bind each request to an edge-verifiable run and repository before using the Depot credential.
F2 (minor, medium confidence): Log redaction runs separately on each page. If a credential is split across two pages, neither fragment matches the configured credential, and both can reach the returned tail. Redact across page boundaries before returning evidence, as depot-ci.md item 3 promises.
F3 (minor, high confidence): The required live acceptance receipt is still missing. Fixture tests cannot show that a coding child can diagnose a real failed Depot check and retry only failed jobs. This remains credential- and deployment-gated; record the child’s actual check, log diagnosis and retry outcome before claiming live proof.
ba7620e to
45e98a5
Compare
There was a problem hiding this comment.
Changes requested: Run/repo binding and log-redaction fixes landed, but live proof is still pending and malformed successful retry responses are accepted.
Warning
Changes requested · head 45e98a5 · 2 findings: 2 minor
| Severity | Finding | Where |
|---|---|---|
| minor | F3 Provide the live failed-check diagnosis and failed-only retry receipt | docs/reference/specs/depot-ci.md:35 |
| minor | F4 Treat malformed 200 retry responses as unknown outcomes | src/execution/depotCi.ts:102 |
Full review
F3 (minor, high confidence): The live acceptance criterion remains unproven, as the spec acknowledges. Before claiming this capability works for coding children, record a deployed child diagnosing a real failed Depot check from returned logs and observe its failed-only retry. This requires edge provisioning and a human-run procedure; fixture tests cannot supply the receipt.
F4 (minor, high confidence): WorkerDepotCi.call accepts any non-null object from a 200 bridge response as a successful retry. A malformed response such as {} is therefore reported as success even though the mutation outcome is unknown, contrary to depot-ci.md item 4. Validate the retry response shape and workflow ID before returning it; otherwise report an unknown outcome.
45e98a5 to
c4c8085
Compare
|
Please re-review exact head
Dispositions and the current-head PR description have been submitted. Current-head CI and independent review remain gates. No merge, approval, new Ship task or changes to the Nominal PRs. |
There was a problem hiding this comment.
Changes requested: Malformed bridge acknowledgements are now handled safely, but live proof remains unproduced and its spec row still claims an agent proof.
Warning
Changes requested · head c4c8085 · 2 findings: 2 minor
| Severity | Finding | Where |
|---|---|---|
| minor | F3 Provide the live failed-check diagnosis and failed-only retry receipt (human-gated) | docs/reference/specs/depot-ci.md:36 |
| minor | F5 Mark unproven live acceptance as a [gap] rather than an [agent] proof | docs/reference/specs/depot-ci.md:36 |
Full review
F3 (minor, high confidence) — The live receipt is still missing. Fixture tests do not show a coding child diagnosing a real failed Depot check and observing a failed-only retry. Keep issue #2250 and the release acceptance gate open until a person can run the documented procedure after deployment.
F5 (minor, high confidence) — The same unproven criterion is still labeled [agent] at docs/reference/specs/depot-ci.md:36. Change it to [gap] with the existing live procedure so the spec does not present an outstanding, human-gated proof as satisfied.
F4 is fixed at this head: a malformed HTTP 200 bridge retry acknowledgement now produces an unknown outcome without replay.
c4c8085 to
749f320
Compare
There was a problem hiding this comment.
Changes requested: Retry response normalization can turn a malformed upstream acknowledgement into apparent success.
Warning
Changes requested · head 749f320 · 1 finding: 1 major
| Severity | Finding | Where |
|---|---|---|
| major | F1 Reject incomplete upstream RetryFailedJobs acknowledgements before returning success | deploy/cloudflare/depotCi.ts:49 |
Full review
F1 (major, high confidence) — deploy/cloudflare/depotCi.ts:49: If Depot returns HTTP 200 with a workflowId but omits jobIds and jobCount, the defaults turn that incomplete mutation response into {jobIds: [], jobCount: 0}. The bot then accepts it as a successful retry, despite the response not establishing what happened. Require those fields in the upstream acknowledgement and report an unknown outcome when either is missing; do not replay the retry.
Co-Authored-By: coreplane-switchboard[bot] <318072483+coreplane-switchboard[bot]@users.noreply.github.com>
749f320 to
e774944
Compare
There was a problem hiding this comment.
Changes requested: Prior retry-acknowledgement defect is fixed; deployed-child acceptance remains unproven and human-gated.
Warning
Changes requested · head e774944 · 1 finding: 1 major
| Severity | Finding | Where |
|---|---|---|
| major | F3 Real-child Depot CI diagnosis and failed-only retry remain unproven | docs/reference/specs/depot-ci.md:37 |
Full review
F3 (major, high confidence): The spec and current PR body correctly leave live acceptance open. The fixture tests do not prove that a deployed coding child can diagnose a real failed Depot check or that a retry leaves successful jobs untouched. Keep this human-gated until the post-deploy procedure records the child’s log diagnosis and observed failed-only retry. The prior F1 is resolved: the Worker now requires both jobIds and jobCount, and the regression covers missing fields without replay.
|
F3 disposition: declined as a pre-merge code finding; retained as a human-gated release and live-acceptance requirement. The spec labels the real-child check |
There was a problem hiding this comment.
LGTM: Code is merge-ready; the real-child Depot receipt remains an explicit post-deploy acceptance gap in #2250, not a pre-merge code finding.
Note
Approved · head e774944 · no findings
Full review
The current code is reviewable and safe to merge. F3 remains an explicitly unproven [gap] and a post-deploy acceptance requirement in #2250; this review does not claim a real-child Depot receipt.
Coding children can inspect failed Depot workflows, read their logs, and request a failed-only retry for their bound repository. The Depot organization token stays in the Cloudflare Worker edge.
Why: Issue #2250 records repeated CI failures that children could not diagnose because Depot logs needed separate authentication. People had to relay failures by hand. The new tools give the coding run the evidence and one narrow retry operation.
Where to look
Feedback wanted: Check one-use permit consumption, credential placement, cross-page redaction, malformed retry acknowledgements, and failed-only retry. Confirm the small shared tool/context edits stay compatible with draft #1625.
Risk: Depot CI API and new optional secrets add a deployment dependency. Without both secrets, tools fail closed. A live child diagnosis and retry cannot be credited until a reviewed release is deployed and configured.
Verified: The new upstream-acknowledgement regression failed before the fix and passes now. The Cloudflare Worker gate passes (75 tests and typecheck); root consistency, typecheck, lint, and format passed. The full local suite had one unrelated macOS
chown justin:justinfailure (12,640 passed). Current-head CI is green. Independent review run bfa746ad approved exact head e774944 with no code findings. Live acceptance remains open.Decisions (3)
Validation (4 criteria)
deploy/cloudflare/depotCi.test.ts::Depot CI edge::*src/core/dispatch/runLoop.test.ts::runLoop — the model turn and everything that rides on it::a coding child reads Depot failure evidence through its repo-bound Worker bridgesrc/core/secretsManifest.test.ts::deploy/secrets.manifest.json::Depot credentials stay at the edge and only the bridge bearer reaches the botdocs/reference/specs/depot-ci.md; no live receipt yetFor agents
Requested in the Ship thread. The source is one #2250 unit. Draft #1625 has limited overlap in
src/tools/toolsets.tsandsrc/tools/runnableTool.ts; do not take over that draft. Merge, release, secret provisioning, and live proof remain separate gates.