Skip to content

test: drain durable publication work before fixture cleanup - #256

Merged
steipete merged 1 commit into
mainfrom
fix/publication-coverage-budget-20260911
Sep 11, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/publication-coverage-budget-20260911

Conversation

@steipete

@steipete steipete commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

The default-branch coverage run timed out during real durable publication under restrictive umask. Vitest deadlines do not cancel filesystem promises, so immediate teardown can also restore mocks and remove fixtures while publication is still running.

Give these integration cases a 30-second I/O budget and drain pending work before restoring mocks or removing fixtures. Every byte, mode, and backend assertion remains intact.

Validation:

  • Injected a six-second source-open delay: the original test fails at five seconds; the repaired test passes in 7.12 seconds.
  • Fresh macOS arm64 native build: 12 applicable publication tests pass.
  • Fresh Linux build: pnpm check passes (5,608 tests), followed by native coverage collection (8,456 tests).
  • Built-package device-path and native-required integration probes pass.
  • Codex local and branch reviews: no actionable P0–P2 findings.

Release notes are consolidated in #257, which should land last. Hosted CI and merged coverage both pass at the exact PR head.

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 11, 2026
@steipete
steipete marked this pull request as ready for review September 11, 2026 21:56
@steipete
steipete requested a review from a team as a code owner September 11, 2026 21:56
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 11, 2026, 6:06 PM ET / 22:06 UTC (Revision 2).

ClawSweeper review

What this changes

The PR gives publication integration tests a 30-second timeout and waits for their filesystem work before restoring mocks and deleting fixtures.

Merge readiness

⛔ Blocked before merge - 3 items remain

The focused repair remains useful and has no identified correctness defect. The new validation report is helpful, but the earlier request for observable publication-versus-cleanup ordering remains unresolved.

Priority: P3
Reviewed head: 7aea41f3f71f2508b98f4bc0bfb5bb9fcf7afc4e

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-correct, with positive runtime observations, but lifecycle proof remains incomplete.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: The reported six-second delay through real publishFileExclusive work, followed by a 7.12-second pass, supports the timeout increase. The supplied observations still do not demonstrate the changed teardown ordering requested previously; hosted CI is supplemental, and inaccessible job logs are a reviewer limitation rather than evidence of missing contributor work. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The reported six-second delay through real publishFileExclusive work, followed by a 7.12-second pass, supports the timeout increase. The supplied observations still do not demonstrate the changed teardown ordering requested previously; hosted CI is supplemental, and inaccessible job logs are a reviewer limitation rather than evidence of missing contributor work. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 8 items Applicable repository policy: Read the complete root AGENTS.md and CONTRIBUTING.md. No nested test policy or maintainer-note directory was found. Applied the filesystem-safety and focused-change guidance; did not run mutation-producing checks or bundled review helpers.
Introduced lifecycle change: The complete introduced patch changes one test file. The stored promise includes publication, finally-based umask restoration, and byte/mode assertions; teardown awaits its settlement before resetting mocks or removing fixtures. Current main lacks both the drain and the explicit test timeout.
Real filesystem boundary: The test invokes the production publication helper. Its copy path performs real reads, writes, file synchronization, identity/hash checks, directory synchronization, and descriptor cleanup. The PR does not alter these production safeguards.
Findings None None.
Security None None.

How this fits together

The publication tests exercise fs-safe’s JavaScript and native file-copy paths against real temporary files. They verify bytes and permissions, then restore process settings and remove fixtures.

flowchart TD
  A[Temporary source file] --> B[Select publication backend]
  B --> C[Publish under restrictive umask]
  C --> D[Restore umask and check result]
  D --> E[Wait for pending test work]
  E --> F[Restore mocks and remove fixtures]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The reported six-second delay through real publishFileExclusive work, followed by a 7.12-second pass, supports the timeout increase. The supplied observations still do not demonstrate the changed teardown ordering requested previously; hosted CI is supplemental, and inaccessible job logs are a reviewer limitation rather than evidence of missing contributor work. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - Raw hosted job logs were inaccessible through the review network; their contents remain unverified, although GitHub confirmed successful runs at the reviewed head.
  • Complete next step (P2) - Attach a redacted transcript or terminal screenshot showing publication completion and umask restoration before fixture removal in the reported slow-filesystem run. Remove private paths and other sensitive details. Update the PR body to trigger re-review; if needed, ask a maintainer to comment @clawsweeper re-review.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Test timeout 5 seconds → 30 seconds The additional budget applies only to the restrictive-umask publication cases.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the narrow test-lifecycle repair, preserving real durability operations and all byte, permission, and backend assertions.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the narrow test-lifecycle repair, preserving real durability operations and all byte, permission, and backend assertions.

Do we have a high-confidence way to reproduce the issue?

Yes: delay source opening beyond the original five-second test deadline while real publication remains pending. Current-main teardown lacks a drain, and the contributor reports this baseline failure; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes: retaining the test promise and awaiting it before cleanup is a focused repair, while the per-case timeout avoids changing suite-wide defaults.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e8a087715a65.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P3: This is a focused integration-test reliability repair with no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The reported six-second delay through real publishFileExclusive work, followed by a 7.12-second pass, supports the timeout increase. The supplied observations still do not demonstrate the changed teardown ordering requested previously; hosted CI is supplemental, and inaccessible job logs are a reviewer limitation rather than evidence of missing contributor work. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Applicable repository policy: Read the complete root AGENTS.md and CONTRIBUTING.md. No nested test policy or maintainer-note directory was found. Applied the filesystem-safety and focused-change guidance; did not run mutation-producing checks or bundled review helpers. (AGENTS.md:24, 7aea41f3f71f)
  • Introduced lifecycle change: The complete introduced patch changes one test file. The stored promise includes publication, finally-based umask restoration, and byte/mode assertions; teardown awaits its settlement before resetting mocks or removing fixtures. Current main lacks both the drain and the explicit test timeout. (test/native-publish-equivalence.test.ts:34, 7aea41f3f71f)
  • Real filesystem boundary: The test invokes the production publication helper. Its copy path performs real reads, writes, file synchronization, identity/hash checks, directory synchronization, and descriptor cleanup. The PR does not alter these production safeguards. (src/publish-file.ts:286, e8a087715a65)
  • Updated contributor observations and review continuity: The captured body and test: drain durable publication work before fixture cleanup #256 (comment) report an injected six-second source-open delay: baseline failure at five seconds and candidate success in 7.12 seconds. This is positive evidence for the increased budget, not merely planned validation. Neither supplied text records publication completion, umask restoration, and fixture-removal ordering requested in the earlier review. The previous review covered the same head and contained no findings. (7aea41f3f71f)
  • Hosted validation verified: GitHub confirms CI run 34651572900 and coverage run 34651572920 succeeded at the reviewed head. Coverage jobs succeeded on Linux, macOS, and Windows. Fetching raw job logs was blocked by the network allowlist, so their contents were not inspected. These statuses remain positive supplemental validation. (7aea41f3f71f)
  • Existing slow-copy probe covers another test: The hosted slow-package-copy scenario targets sidecar-lock process-exit tests, not publication. It cannot substitute for the publication lifecycle observation. The coverage workflow runs the normal native-backed suite. (scripts/slow-package-copy.config.ts:8, e8a087715a65)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach redacted output from the reported real-filesystem scenario showing publication completion and umask restoration before fixture removal.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-11T21:55:58.223Z sha 7aea41f :: needs real behavior proof before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer proof for 7aea41f3f71f2508b98f4bc0bfb5bb9fcf7afc4e:

  • CI: success, including Node 22/24, native checks, and package smoke on supported CI targets.
  • Merged coverage: success across Linux, macOS, and Windows.
  • Injected six-second source-open delay: original test fails at five seconds; repaired test passes in 7.12 seconds with the byte and mode assertions intact.
  • Fresh macOS native publication suite: 12 passed. Linux full check: 5,608 passed; native coverage collection: 8,456 passed.
  • Built-package device-path and native-required probes pass. Local and branch Codex reviews are clean at P0–P2.

Ready for squash merge. The consolidated release note is in #257.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 11, 2026
@steipete
steipete merged commit 52f4dda into main Sep 11, 2026
34 checks passed
@steipete
steipete deleted the fix/publication-coverage-budget-20260911 branch September 11, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant