Repository navigation
canary(land): test that a land check's base never reaches a launched agent - #309
Conversation
…agent Canary for the land fixer: pairs with canary/rename, which renames the helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
quest land removed this pull request from the queue: the batch check failed (exit 1). bun install --frozen-lockfile bun install v1.4.2 (744846f84) + @types/mdast@4.0.4 + @types/node@26.6.5 + prettier@3.9.10 + typescript@7.0.2 + vitest@5.0.5 + @opencode-ai/sdk@1.19.0 + commander@15.0.0 + mdast-util-from-markdown@2.1.0 + mdast-util-gfm-strikethrough@2.0.1 + mdast-util-gfm-table@2.0.0 + micromark-extension-gfm-strikethrough@2.1.0 + micromark-extension-gfm-table@2.1.2 185 packages installed [19.66s] bun run --silent quest gate just _check bun run check $ tsc && tsc -p src/core && prettier --check . test/agent.test.ts(674,14): error TS2304: Cannot find name 'agentEnvironment'. error: script "check" exited with code 1 error: recipe `_check` failed on line 19 with exit code 1 error: recipe `check` failed on line 16 with exit code 1 . |
|
codex / Codex land fixer: SETUP.md
assets
bun.lock
bunfig.toml
cloudflare
design
docs
examples
flake.lock
flake.nix
justfile
nix
package.json
quest
scripts
src
test
tsconfig.json
vitest.config.ts
commit 468d30d17ce85896b9a477e085112a762c8d9a45
Author: Luke Curley <432854+kixelated@users.noreply.github.com>
AuthorDate: Fri Oct 30 20:48:04 2026 -0700
Commit: Luke Curley <432854+kixelated@users.noreply.github.com>
CommitDate: Fri Oct 30 20:48:04 2026 -0700
canary(land): rename agentEnvironment to launchEnvironment
Canary for the land fixer: pairs with canary/caller, which calls the old name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit 9ec6903f3b03e936d2c8a0bc97b6fd6c918e1437
Author: Luke Curley <432854+kixelated@users.noreply.github.com>
AuthorDate: Fri Oct 30 20:48:10 2026 -0700
Commit: Luke Curley <432854+kixelated@users.noreply.github.com>
CommitDate: Fri Oct 30 20:48:10 2026 -0700
canary(land): test that a land check's base never reaches a launched agent
Canary for the land fixer: pairs with canary/rename, which renames the helper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/cli/agent.ts | 4 ++--
test/agent.test.ts | 9 +++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
codex
The failure comes from combining the PRs: #308 renames `agentEnvironment` to `launchEnvironment`, while #309 adds a test using the old name. Each is consistent with the current base on its own.
I’ll requeue #308 and hand back #309 to follow the rename after #308 lands. Fixing #309 now would require including the other PR’s code, which the branch-history rule forbids. Runtime checks are unavailable here because Bun, Node, and TypeScript are not installed.
exec
/bin/bash -lc 'git grep -n -e agentEnvironment -e launchEnvironment pr-308 -- src test; git grep -n -e agentEnvironment -e launchEnvironment pr-309 -- src test; git diff --check base pr-308; git diff --check base pr-309; command -v python3' in /work
succeeded in 0ms:
pr-308:src/cli/agent.ts:224:export function launchEnvironment(env: NodeJS.ProcessEnv, variable: string, key: string): NodeJS.ProcessEnv {
pr-308:src/cli/agent.ts:661: const env = launchEnvironment(deps.env, harness.keyVariable, key);
pr-308:test/agent.test.ts:20: launchEnvironment,
pr-308:test/agent.test.ts:241: const env = launchEnvironment(
pr-309:src/cli/agent.ts:224:export function agentEnvironment(env: NodeJS.ProcessEnv, variable: string, key: string): NodeJS.ProcessEnv {
pr-309:src/cli/agent.ts:661: const env = agentEnvironment(deps.env, harness.keyVariable, key);
pr-309:test/agent.test.ts:20: agentEnvironment,
pr-309:test/agent.test.ts:241: const env = agentEnvironment(
pr-309:test/agent.test.ts:674: const env = agentEnvironment({ PATH: "/bin", QUEST_LAND_BASE: "0".repeat(40) }, "ANTHROPIC_API_KEY", "sk-agent");
/nix/store/lb41b0anx1f98y9y5s9mdv97gjgsq740-python3-3.14.7/bin/python3
exec
/bin/bash -lc "python3 - <<'PY'
import json
from pathlib import Path
result = [
{\"number\": 308, \"action\": \"requeue\", \"reason\": \"Consistent rename on current base; batch failure is #309's added caller of the old name.\"},
{\"number\": 309, \"action\": \"handback\", \"diagnosis\": \"Batch test/agent.test.ts:674 calls agentEnvironment after #308 renames it to launchEnvironment (TS2304); adapting now requires unlanded #308 history, outside the permitted branch scope.\", \"recommendation\": \"Land #308 first, then merge the updated base into #309 and mechanically rename its added test call to launchEnvironment.\"}
]
Path('quest-land-result.json').write_text(json.dumps(result, indent=2) + '\\n')
assert len(result) == 2
PY
git status --short; git branch -v" in /work
succeeded in 249ms:
?? quest-land-result.json
* (HEAD detached at 85d1aa6) 85d1aa6 canary(land): test that a land check's base never reaches a launched agent (#309)
base 71558d1 fix(agent): don't pass a land check's base to launched agents (#307)
batch 85d1aa6 canary(land): test that a land check's base never reaches a launched agent (#309)
pr-308 468d30d canary(land): rename agentEnvironment to launchEnvironment
pr-309 9ec6903 canary(land): test that a land check's base never reaches a launched agent
codex
Wrote [quest-land-result.json](/work/quest-land-result.json), left uncommitted.
- #308: requeue unchanged.
- #309: hand back; its test uses the name renamed by #308. Land #308 first, then update #309 against base.
All branches remain unchanged. Static checks passed; runtime checks were unavailable because Bun, Node, and TypeScript are absent.
tokens used
11,015
Wrote [quest-land-result.json](/work/quest-land-result.json), left uncommitted.
- #308: requeue unchanged.
- #309: hand back; its test uses the name renamed by #308. Land #308 first, then update #309 against base.
All branches remain unchanged. Static checks passed; runtime checks were unavailable because Bun, Node, and TypeScript are absent.
fixer result written
(written by codex / Codex) |
|
quest land removed this pull request from the queue: the batch check failed (exit 1). bun install --frozen-lockfile bun install v1.4.2 (744846f84) + @types/mdast@4.0.4 + @types/node@26.6.5 + prettier@3.9.10 + typescript@7.0.2 + vitest@5.0.5 + @opencode-ai/sdk@1.19.0 + commander@15.0.0 + mdast-util-from-markdown@2.1.0 + mdast-util-gfm-strikethrough@2.0.1 + mdast-util-gfm-table@2.0.0 + micromark-extension-gfm-strikethrough@2.1.0 + micromark-extension-gfm-table@2.1.2 185 packages installed [3.30s] bun run --silent quest gate just _check bun run check $ tsc && tsc -p src/core && prettier --check . test/agent.test.ts(674,14): error TS2304: Cannot find name 'agentEnvironment'. error: script "check" exited with code 1 error: recipe `_check` failed on line 19 with exit code 1 error: recipe `check` failed on line 16 with exit code 1 . |
|
codex / Codex land fixer: assets/land-fix.md | 3 ++-
src/cli/agent.ts | 4 ++--
src/cli/hold.ts | 9 ++-------
src/cli/land-fixer.ts | 10 ++++------
src/cli/land.ts | 29 +++++++++++++++++++++++++++++
test/agent.test.ts | 4 ++--
test/hold.test.ts | 27 ++++++++++++++++++++++++++-
test/land.test.ts | 4 ++--
8 files changed, 69 insertions(+), 21 deletions(-)
$ tsc && tsc -p src/core && prettier --check .
/nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash: line 1: tsc: command not found
error: script "check" exited with code 127
exec
/bin/bash -lc 'bun install --frozen-lockfile' in /work
exec
/bin/bash -lc 'git diff --check && git diff -- test/agent.test.ts && git status --short' in /work
succeeded in 0ms:
diff --git a/test/agent.test.ts b/test/agent.test.ts
index ca46f2b..6f750ff 100644
--- a/test/agent.test.ts
+++ b/test/agent.test.ts
@@ -671,6 +671,6 @@ fakes("a Codex release failure is reported instead of a finished outcome", async
});
test("a land check's base never reaches a launched agent", () => {
- const env = agentEnvironment({ PATH: "/bin", QUEST_LAND_BASE: "0".repeat(40) }, "ANTHROPIC_API_KEY", "sk-agent");
+ const env = launchEnvironment({ PATH: "/bin", QUEST_LAND_BASE: "0".repeat(40) }, "ANTHROPIC_API_KEY", "sk-agent");
expect(env).toEqual({ PATH: "/bin", ANTHROPIC_API_KEY: "sk-agent" });
});
M test/agent.test.ts
succeeded in 29899ms:
bun install v1.4.2 (744846f84)
+ @types/mdast@4.0.4
+ @types/node@26.6.5
+ prettier@3.9.10
+ typescript@7.0.2
+ vitest@5.0.5
+ @opencode-ai/sdk@1.19.0
+ commander@15.0.0
+ mdast-util-from-markdown@2.1.0
+ mdast-util-gfm-strikethrough@2.0.1
+ mdast-util-gfm-table@2.0.0
+ micromark-extension-gfm-strikethrough@2.1.0
+ micromark-extension-gfm-table@2.1.2
185 packages installed [30.03s]
exec
/bin/bash -lc 'bun run check && bun run test -- test/agent.test.ts' in /work
succeeded in 12101ms:
$ tsc && tsc -p src/core && prettier --check .
Checking formatting...
All matched files use Prettier code style!
$ vitest run test/agent.test.ts
RUN v5.0.5 /work
Test Files 1 passed (1)
Tests 28 passed | 1 skipped (29)
Start at 21:36:46
Duration 7.32s (tests 85%, transform 12%, import 2%)
exec
/bin/bash -lc "git add test/agent.test.ts && git commit -m 'fix(test): follow launchEnvironment rename from base' && python3 - <<'PY'
import json, subprocess
from pathlib import Path
head = subprocess.check_output(['git','rev-parse','pr-309'],text=True).strip()
subprocess.run(['git','merge-base','--is-ancestor','9ec6903f3b03e936d2c8a0bc97b6fd6c918e1437',head],check=True)
Path('quest-land-result.json').write_text(json.dumps([{'number':309,'action':'fixed','head':head,'reason':'Merged base and followed its agentEnvironment to launchEnvironment rename in the added test.'}],indent=2)+'\\n')
PY
git status --short && git diff base pr-309 --stat && git branch -v" in /work
succeeded in 161ms:
[pr-309 b380388] fix(test): follow launchEnvironment rename from base
1 file changed, 1 insertion(+), 1 deletion(-)
?? quest-land-result.json
test/agent.test.ts | 5 +++++
1 file changed, 5 insertions(+)
base a0b2afb fix(land): requeue comments say why, without a blanket flaky follow-up (#310)
batch 61d5f01 canary(land): test that a land check's base never reaches a launched agent (#309)
* pr-309 b380388 fix(test): follow launchEnvironment rename from base
codex
Fixed PR 309 by merging base and updating the test to follow the `launchEnvironment` rename. No behavior changed.
TypeScript and formatting checks passed; agent tests passed (28 passed, 1 skipped).
[quest-land-result.json](/work/quest-land-result.json) is written and uncommitted.
tokens used
7,757
Fixed PR 309 by merging base and updating the test to follow the `launchEnvironment` rename. No behavior changed.
TypeScript and formatting checks passed; agent tests passed (28 passed, 1 skipped).
[quest-land-result.json](/work/quest-land-result.json) is written and uncommitted.
fixer result written
(written by codex / Codex) |
After pushing a fix, the daemon reread the PR to record it, but GitHub still showed the old head, so it handed back a PR it had just fixed (#309 in the live canary). It now waits up to a minute for its own head; only a third head is a real move. Co-authored-by: Luke Curley <432854+kixelated@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: moq-bot <moq-bot@users.noreply.github.com>
Land fixer canary, half 2. This pairs with canary/rename, which renames
agentEnvironmenttolaunchEnvironment. This PR adds a test calling the old name. Each passes CI alone, and a batch of both failstsc.Expected outcome: the fixer updates this PR's call to follow the rename (a mechanical fix), records it in
## Review, pushes it as moq-bot, and requeues it.The test itself is a real one: an agent launched from a land check never inherits
QUEST_LAND_BASE(#307).Review
mechanical fix by codex / Codex:
follow launchEnvironment rename from base(head b380388) — recorded by hand: the daemon's own write lost a race with GitHub (#311).Skipped: a five-line test, part of a canary.
🤖 Generated with Claude Code
(written by Claude Opus 5.5)