Skip to content

🐛 Keep the session-name assertion off the random profile root (#714) - #716

Merged
taras merged 1 commit into
mainfrom
agent/issue-714-plan-flake
Sep 2, 2026
Merged

🐛 Keep the session-name assertion off the random profile root (#714)#716
taras merged 1 commit into
mainfrom
agent/issue-714-plan-flake

Conversation

@taras

@taras taras commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Why

main went red at 392c006 (#714): test-deno (6/9) failed packages/cli/tests/plan.test.tsC4: one Session carries every turn, and --session names it with

Expected substring: not "ada"
Received string: "/tmp/xmd-plan-profile-dada9d00-71af-4d93-937f-2438337c23b6/fdee430d…"

The product did what the case describes — the directory leaf is the digest of the session name, never the name. The assertion was reading the whole path, and the harness's profile root above the leaf is a temporary directory named by a random hex UUID, which contains the substring ada about one run in a hundred. Run 33574538193 drew one.

What changes

Before: expect(namedDirectories[0]).not.toContain("ada") — the full path, random root included.

After: expect(relative(authorshipRoot, namedDirectories[0])).not.toContain("ada") — only the part beneath the root the case handed in, which is the leaf the host derived. The comment beside it says why the root is excluded.

The preceding line, expect(namedDirectories[0]).toBe(authorshipDirectoryFor(authorshipRoot, "ada")), is unchanged and still pins the leaf to the exact digest; the relaxed line keeps the "name never reaches the path" claim without depending on what a UUID happens to spell.

How to verify it

  • deno task test packages/cli/tests/plan.test.ts at 809bc0c: ok | 1 passed (17 steps) | 0 failed.
  • The failing case in the CI log is the discriminating input: with the root …/xmd-plan-profile-dada9d00-… the old assertion fails and the new one passes, because relative(root, path) is fdee430d…5029, the digest of ada, which holds no ada.

Scope

Included

  • One assertion and one import in packages/cli/tests/plan.test.ts.

Intentionally unchanged

  • The shards themselves. Every runtime's shards are now over the 300 s ceiling AGENTS.md sets (this run: Deno worst 399 s, Node 388 s, Bun 491 s) because test-weights.json was measured 50 commits ago and four newer files run at the fallback weight — shard 6/9 predicted 587 s for itself. Remeasuring on the runner and recalibrating the counts is a separate PR, following ⚡ Remeasure test weights at the delivered document-suite topology #606.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • Generated or mechanical changes are clearly identified.
  • The description matches the final diff and test results.

`C4: one Session carries every turn, and --session names it` asserted that
the whole authorship directory path holds no "ada". The path's leaf is the
digest of the name and the assertion is about the leaf; the root above it is
a temporary directory named by a random hex UUID, which spells "ada" about
one run in a hundred — run 33574538193 drew `xmd-plan-profile-dada9d00-…`.
The assertion now reads the path relative to the root it was given.
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

PR #716: 🐛 Keep the session-name assertion off the random profile root (#714)

1 files, +5 / -3

Scope

✅ PR scope looks good.

Structural

✅ No structural bloat detected.

Slop

✅ Slop indicators look low.

Static Analysis

✅ Oxlint found no issues.

Correctness

✅ Small PR — correctness review skipped.

@taras
taras enabled auto-merge (squash) September 2, 2026 02:37
@taras
taras disabled auto-merge September 2, 2026 03:07
@taras
taras merged commit a7f60c0 into main Sep 2, 2026
30 checks passed
@taras
taras deleted the agent/issue-714-plan-flake branch September 2, 2026 03:07
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