Repository navigation
fix(scenarios): skill-eval turns are spawned without the host's memory variables - #38165
Conversation
…y variables A turn inherited CLAUDE_COWORK_MEMORY_PATH_OVERRIDE and CLAUDE_MEMORY_STORES from a project container, so both arms read the project's memory and the no-skill arm could score as if it had the skill. turnEnv now drops them, listed as CLAUDE_MEMORY_ENV beside the billing and effort variables. Claude-Session: https://claude.ai/code/session_01L6bhgXWFXqMUE85PmLT9AE Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check5 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 5a8201072a5ebe6e17b2ed321ffc0311e65bded6 && git checkout 5a8201072a5ebe6e17b2ed321ffc0311e65bded6
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 ac1dd475766e60f1db15123977b7b3ab95025a9d && git checkout -B drift-repro 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 && git merge --no-ff ac1dd475766e60f1db15123977b7b3ab95025a9d
node scripts/docs-audit/affected-docs.mjs --json 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 |
…the host's memory variables too ClaudeCodeDriver.turnEnv drops CLAUDE_MEMORY_ENV beside the billing and effort variables, so a scenario round run in a project container does not read the project's memory either. Claude-Session: https://claude.ai/code/session_01L6bhgXWFXqMUE85PmLT9AE Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head ac1dd47 · card #37842 · area s2-ai · 2026-11-28T05:36ZL1 checklist (no review face on this file list: this record is the review of record)
Tier: S. Landing: ready and auto-merge in this stroke. |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46112971270 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#2 · os-sales · session_01L6bhgXWFXqMUE85PmLT9AE Queue ejection, read at 2026-11-28T06:12Z: build 46112971270 (main a29f9b8 plus this PR alone) failed |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — re-queue · head ac1dd47 · card #37842 · area s2-ai · 2026-11-28T06:34ZThe merge queue ejected this PR on three dogfood suites ( Landing: auto-merge re-armed in this stroke. |
Requested by Sales · project thread
Fixes #37842
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/qa/scenarios/src/runner/driver.ts: newCLAUDE_MEMORY_ENV = ['CLAUDE_COWORK_MEMORY_PATH_OVERRIDE', 'CLAUDE_MEMORY_STORES'], declared besideAPI_BILLING_ENVandCLAUDE_EFFORT_ENV, so the three lists of what a turn is spawned without live in one place.packages/qa/scenarios/src/runner/driver.ts:ClaudeCodeDriver.turnEnv, the scenario runner's live driver, also deletes every name inCLAUDE_MEMORY_ENV, so its build (author) and ask turns are spawned without the host's memory variables too. Folded in at the seat's word after the first hand-off.packages/qa/scenarios/src/skill-evals/run.ts:turnEnvdeletes every name inCLAUDE_MEMORY_ENV, after the billing and effort variables.executeRoundalready spawns every turn withturnEnv(), so both arms of every case get the scrubbed environment. The file header says so.packages/qa/scenarios/README.md(skill-evals section): a new Isolated from project memory bullet says a round run inside a project container is isolated from that project's memory, which variables are removed and why, and that the scenario runner's build and ask turns are isolated too..changeset/37842-skill-evals-memory-isolated.md:patchfor@objectstack/scenarios(the README ships in itsfiles[]).Measured before the change, in this container: both variables are set here (presence read only, values never printed). The card's evidence is the two rounds of PR #37841: with the variables inherited, all three no-skill answers to case 2 quoted a project memory note; with them removed, case 2 scored 3/3 with the skill and 0/3 without. No eval round was run for this PR.
Tests
packages/qa/scenarios/test/skill-evals/skill-evals.test.ts:PATH,HOME, both billing variables, the effort variable and both memory variables yields exactly{ PATH, HOME }; every name of the three lists is absent; the memory list names both variables; the caller's env object is left as it was.process.envand asserts that none of the four turns (two cases × two arms) receives either one. This pins the wiring throughexecuteRound, not only the pure function.packages/qa/scenarios/test/runner/units.test.ts(the live driver against a stand-inclaude): the stand-in'sENVturn now also answers which memory variables it was started with; a new test stubs both inprocess.env, runs one build turn and one ask turn throughmakeDriver, and asserts neither turn was started with either.Ablation, one line at a time: with
for (const k of CLAUDE_MEMORY_ENV) delete out[k];removed from the skill-evalsturnEnv, 3 tests fail (the two new ones and the round test) and 37 pass; restored, 40/40. With the same line removed fromClaudeCodeDriver.turnEnv, the newunits.test.tstest fails and 95 pass; restored, 96/96.runs
Head ac1dd47.
pnpm --filter '@objectstack/scenarios^...' buildthenpnpm --filter @objectstack/scenarios build: exit 0.pnpm --filter @objectstack/scenarios test: 45 files, 1411 tests passed.pnpm --filter @objectstack/scenarios typecheck: exit 0.pnpm --filter @objectstack/scenarios skill-evals --self-test: 44 rows pass.node scripts/pm/dispatch-gates.mjs --commands: 65 derived (the same 65 as on the first head); 64 exit 0; 1 exit 3 (PREREQUISITE NOT MET), so NOT MEASURED locally and left to CI:node scripts/check-plugin-teardown-shape.mjs --self-test(its positive control is pinned to a commit this shallow clone cannot reach).Acceptance notes
CLAUDE_CODE_REMOTE_MEMORY_DIR,CLAUDE_COWORK_MEMORY_INDEX_CONTENT,CLAUDE_COWORK_MEMORY_GUIDELINES,CLAUDE_COWORK_MEMORY_EXTRA_GUIDELINES,CLAUDE_CODE_MEMORY_API_BASE_URL,CLAUDE_CODE_MEMORY_API_TOKEN): not set in this container, not measured, not handled by this PR.round.jsonis unchanged; the README now states it for every round.Verification
Read first:
packages/qa/scenarios/src/skill-evals/run.ts(turnEnv), thenClaudeCodeDriver.turnEnvinsrc/runner/driver.ts, then the two new test spots.Two-minute check:
pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/skill-evals/skill-evals.test.ts test/runner/units.test.tsprints 136 passed.Generated by Claude Code