🐛 Keep the session-name assertion off the random profile root (#714) - #716
Merged
Conversation
`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.
4 tasks
taras
enabled auto-merge (squash)
September 2, 2026 02:37
taras
disabled auto-merge
September 2, 2026 03:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
mainwent red at 392c006 (#714):test-deno (6/9)failedpackages/cli/tests/plan.test.ts›C4: one Session carries every turn, and --session names itwithThe 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
adaabout 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.tsat 809bc0c:ok | 1 passed (17 steps) | 0 failed.…/xmd-plan-profile-dada9d00-…the old assertion fails and the new one passes, becauserelative(root, path)isfdee430d…5029, the digest ofada, which holds noada.Scope
Included
packages/cli/tests/plan.test.ts.Intentionally unchanged
test-weights.jsonwas 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