Repository navigation
Description
Tier: 1
Project: cli
Type: fix
Objectives
O1. No test in processes/vinaya/tests/resume.test.ts spawns gh or reaches the network: every checkpoint-resume path in those tests answers the held-pull-request-conflict question from a stub.
O2. bun test processes/vinaya/tests/resume.test.ts completes with every test passing when GitHub is unreachable (for example with HTTPS_PROXY pointed at an unroutable address), and no single test takes longer than one second.
O3. Every test that passed before still passes, with no test timeout raised.
Documentation
processes/vinaya/tests/resume.test.ts—stubRun, which builds the run options and the task input without a stub for the held-pull-request-conflict read (O1, O2)processes/vinaya/tests/run-lifecycle.test.ts— the existing pattern that stubsoptions.heldPullRequestConflicts(O1)processes/vinaya/bin/run-engine.ts—heldPullRequestConflictsLive, the live fallback that runsgh pr listwhen the option is not set (O1)
Planner's rationale
Boundary — One thing: the resume tests stop calling GitHub. Pinned files: processes/vinaya/tests/resume.test.ts, processes/vinaya/process.yaml. Out: processes/vinaya/bin/run-engine.ts and the CLI's gh helper (a timeout on it is a separate change); test timeouts; any other test file.
Traps to avoid — Do NOT raise Bun's per-test timeout. Do NOT change the production fallback in run-engine.ts. Stub the read the way run-lifecycle.test.ts already does (options.heldPullRequestConflicts = async () => false), or give the task input a bound findOpenPrForBranch that returns null; keep the existing test cases that assert a conflict by stubbing true explicitly.
Suggested agent-class — low: one test file, one stub.
Stop-and-escalate — Stop if a resume test needs the real forge answer to assert what it asserts.
Docs to keep coherent — no-doc-surface
Premises
processes/vinaya/tests/resume.test.tscontainstaskInput: { branch: BRANCH } as TaskInput,processes/vinaya/tests/run-lifecycle.test.tscontainssecond.options.heldPullRequestConflicts = async () => falseprocesses/vinaya/bin/run-engine.tscontainsexport function heldPullRequestConflictsLive(task: TaskInput | undefined): () => Promise<boolean> {
Surface
in: processes/vinaya, .changeset
out: apps/vinaya-portal, apps/log-server, packages, harness, aeg-root, .github/workflows
atta-labs/process-version-bump: a test-only change that does not alter how the process behaves; if the check still requires it, processes/vinaya/process.yaml gets a patch bump in the same change.
reader-resolvable-prose: test comments describe the stub itself and carry no Issue or pull-request numbers and no tranche slugs.
Parts
Part 1 (O1, O2, O3) — stubRun sets a stubbed held-pull-request-conflict read by default; tests that need a conflict stub it to true.
Test plan
bun test processes/vinaya/tests/resume.test.ts → passes, every test under one second
bun test processes/vinaya/tests/resume.test.ts → passes with GitHub unreachable (HTTPS_PROXY set to an unroutable address), every test under one second
bun test processes/vinaya/tests/run-lifecycle.test.ts → passes
bun apps/cli/src/index.ts check --all → every check passes
Stop conditions
- A resume test cannot assert its behaviour without the real forge answer.
Origin
Principal-directed, 2026-10-25. Inside the Developer sandbox, bun test processes/vinaya/tests/prepare-run.test.ts processes/vinaya/tests/resume.test.ts took 6m45s and the full processes/vinaya/tests run hit the 10-minute tool limit, against 12s outside the sandbox. The cause: resume.test.ts's stubRun leaves the held-pull-request-conflict read unstubbed, so a checkpoint resume runs the real gh pr list with retries and no timeout; with GitHub unreachable each call waits about 30 seconds. Outside the sandbox the slowest test already takes 4.9s, close to the 5s default timeout.
Activity
daniboomerang commentedon Oct 25, 2026
Brief hash: 24009b1511728533884eb9620befe8e61e2b13c412b5825bde2f34b9a011a760
For: [model] (coding-agent CLI on a dev machine, dispatched locally, unattended)
Reason: Suggested agent-class — low: one test file, one stub.
Owner: the Principal
Goal: Fix(test): resume tests stop calling GitHub
Project: ** cli
Tier: 1
Closes #1659
You are the AEG Developer. Run
bun apps/cli/src/index.ts doctrine --role developer --printand read its output first. Mandatory.Objectives
O1. No test in
processes/vinaya/tests/resume.test.tsspawnsghor reaches the network: every checkpoint-resume path in those tests answers the held-pull-request-conflict question from a stub.O2.
bun test processes/vinaya/tests/resume.test.tscompletes with every test passing when GitHub is unreachable (for example withHTTPS_PROXYpointed at an unroutable address), and no single test takes longer than one second.O3. Every test that passed before still passes, with no test timeout raised.
Documentation
processes/vinaya/tests/resume.test.ts—stubRun, which builds the run options and the task input without a stub for the held-pull-request-conflict read (O1, O2)processes/vinaya/tests/run-lifecycle.test.ts— the existing pattern that stubsoptions.heldPullRequestConflicts(O1)processes/vinaya/bin/run-engine.ts—heldPullRequestConflictsLive, the live fallback that runsgh pr listwhen the option is not set (O1)Premises
Checked against the code when this task Issue was cut, and again against the default branch at dispatch — facts, not claims.
processes/vinaya/tests/resume.test.tscontainstaskInput: { branch: BRANCH } as TaskInput,processes/vinaya/tests/run-lifecycle.test.tscontainssecond.options.heldPullRequestConflicts = async () => falseprocesses/vinaya/bin/run-engine.tscontainsexport function heldPullRequestConflictsLive(task: TaskInput | undefined): () => Promise<boolean> {2. Context — read before doing anything
task/issue-1659.Depends-on: —,Conflicts-with: —.b39fb00e8e327a1a9ba79de16fc84eeeb5154a25— the checkout's HEAD equaled the remote default branch, and no pinned file below carried an uncommitted change, when these facts were read.processes/vinaya/tests/resume.test.ts,processes/vinaya/process.yaml. Out:processes/vinaya/bin/run-engine.tsand the CLI'sghhelper (a timeout on it is a separate change); test timeouts; any other test file.run-engine.ts. Stub the read the wayrun-lifecycle.test.tsalready does (options.heldPullRequestConflicts = async () => false), or give the task input a boundfindOpenPrForBranchthat returns null; keep the existing test cases that assert a conflict by stubbingtrueexplicitly.3. Technical dependencies
Dependency rationale — none: this single-fix Issue declares no
Depends-onorConflicts-withedge.4. Technical surface map
Create:
Modify:
Out of surface: apps/vinaya-portal, apps/log-server, packages, harness, aeg-root, .github/workflows — a change there, or to any path no Surface
in:glob covers, is still published: the review-loop driver records each such path in the pull request body's beyond-Surface block, and the reviewers judge it like any change.Premise pins
Premise:
5. Pre-flight checks
Step 0 (mandatory, verbatim):
origin/main; branch suffix literal-matches the task id.bun apps/cli/src/index.ts task run), the driver has already run the dispatch-readiness gate plus, on this repository toolchain, its own fuller derivation from its own unsandboxed process before dispatching you (re-derived at render time: it was ready), and dispatches you only when that verdict is READY — a NOT READY verdict refuses the turn before it starts, so being dispatched is the verdict: look for no file and run neither script, whose ownghcall fails inside your sandbox. Working manually, with no driver behind you, fall back toroles/developer.md's own items 3/5/7 prose — each a complete, hand-run forge check in its own right.On any failure: STOP and report.
6. Numbered parts — publish once with
publish_changeswhen every Part is done, thenopen_pull_requestPart 1 (O1, O2, O3):
stubRunsets a stubbed held-pull-request-conflict read by default; tests that need a conflict stub it to true.Files (touches the repo root):
The pre-push hook runs the affected suite on your one push and refuses it on failure — do not run it yourself per Part.
7. Documentation-update list
.vinaya/doc-ownersderivation matched zero bindings against this task's surface — no mechanically-derived doc updates. Confirm no additional doc artifact applies before treating this list as final.8. Verification before claiming done
run_checksand CI provide the authoritative results. Do not hand-run or paste static-gate commands. Working manually, run this repository's declared typecheck, lint/format, build, and documentation-gate commands yourself.bun apps/cli/src/index.ts doctrine --role developer --printgenuinely satisfied; use the controller'srun_checksresult, hooks, and CI as gate evidence.9. Test Plan
10. Stop conditions
Stop-and-escalate — Stop if a resume test needs the real forge answer to assert what it asserts.
11. Constraints
12. Deliverable
Fix(test): resume tests stop calling GitHubopen_pull_requesttool (title and body); publish your commits withpublish_changesand update the body withupdate_pull_request_body/refresh_evidence— you hold nogh/git pushcredential.publish_changes, when every Part is done; then open the pull request withopen_pull_request. Publish again only to answer review findings or a red gate — a refused hook, a failing check, a merge conflict.bun apps/cli/src/index.ts doctrine --template pr-report --print), withCloses #1659at the top of the header block. This brief stays frozen on the task Issue and never rides in the body.run_checksand CI run it.git diff origin/main...HEAD --statas context only; Surface is judged by the driver'ssurface-scopecheck, never by this hand-run diff. Token use needs no report — the Vinaya log records it.