Skip to content

test: consolidate atomic settlement, copy, ZIP and publication suites - #814

Closed
steipete wants to merge 1 commit into
mainfrom
steipete/deslop-r5-tests-archive
Closed

steipete wants to merge 1 commit into
mainfrom
steipete/deslop-r5-tests-archive

Conversation

@steipete

@steipete steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Atomic temp-owner settlement, copy close-precedence, copy-fallback guards, ZIP admission, publication, preserved-mode, and TAR boundary suites still duplicated support code and scenario bodies: the private and public atomic settlement suites each carried their own failure values, capture helpers, and assertions; four ZIP admission siblings and a copy-wrapper close suite had been split from their owners; and sync/async or portable/target-swap twins were written out separately.

User Impact

No user-visible change; tests only (src/ and native/ byte-identical).

Why This Change Was Made

  • test/helpers/atomic-settlement.ts and test/helpers/copy-close-precedence.ts hold the shared settlement and close-precedence machinery; the public settlement suite runs one mode-parameterized body.
  • copy-wrapper-close-precedence merges into copy-tree-close-precedence, and the ZIP admission owner/reuse/timing siblings merge into archive-zip-portable-metadata (399 and 436 lines, under the 500-line limit), each with isolated per-test compression state.
  • Copy-fallback guard twins, publication target-swap twins, preserved-mode admission, and TAR boundary fixtures become tables; one TAR header assertion that duplicated the retained case (same bytes, limits, error, plus stream destruction) is folded in.

Net -562 lines, four fewer files.

Evidence

  • Registered tests 525 before and after across all affected files; 516 passed, 9 native-artifact-gated skips, matching baseline.

  • No remaining reference to the four deleted filenames.

  • tsc, lint:file-size, lint:fs-boundary: pass. Codex autoreview (P0-P2): clean.

  • Tests added or updated when behavior changed

  • Security and compatibility impact considered

  • CHANGELOG.md updated when release-relevant

  • No credentials, private paths, private hosts, or sensitive contents included

@steipete
steipete requested a review from a team as a code owner October 1, 2026 14:43
@clawsweeper

clawsweeper Bot commented Oct 1, 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 10:47 AM ET / 14:47 UTC.

ClawSweeper review

What this changes

The branch shares test helpers and combines atomic-write, copy, ZIP, publication, and TAR boundary scenarios to reduce duplicated test code.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful, focused test consolidation that remains absent from current main. The reviewed diff preserves the safety scenarios and introduces no actionable correctness finding.

Priority: P3
Reviewed head: f6aa0da3e7daf9e6062b327501a98e85ff63e1c7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable test consolidation with retained scenarios and no concrete defect found through static review.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied Repository State identifies a trusted MEMBER author, and the branch changes only test organization with no changed production behavior. Reported test results are supplemental validation; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied Repository State identifies a trusted MEMBER author, and the branch changes only test organization with no changed production behavior. Reported test results are supplemental validation; no stored-data contract changes.
Evidence reviewed 7 items Pinned introduced scope: The complete introduced diff changes only 14 test paths: 1,186 additions and 1,748 deletions. Production source, native code, dependencies, and workflows have no introduced changes.
Settlement and copy coverage retained: Compared the deleted helpers and wrapper suite against their replacements. Both atomic API modes retain the operation/cleanup/close combinations and falsy-value identity assertions; copy wrapper scenarios retain close ordering and operation-error precedence.
ZIP isolation and archive boundaries: The merged ZIP suite retains ownership, reuse, timing, native-mode, and decoder-disagreement cases. Its method-corruption case replaces the compression object rather than mutating shared state. The retained TAR pipeline case still checks the same truncated-header error plus stream destruction.
Findings None None.
Security None None.

How this fits together

fs-safe guards filesystem operations on untrusted paths. These tests exercise archive admission, file identity checks, publication, and cleanup failures to verify safe results and error precedence.

flowchart TD
  A[Archive bytes and filesystem fixtures] --> B[Shared test helpers]
  B --> C[Atomic writes and copying]
  B --> D[Archive admission and publication]
  C --> E[Injected failures and identity swaps]
  D --> E
  E --> F[Assert contents, cleanup and errors]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Code delta Production +0/-0; tests and helpers +1,186/-1,748, net -562 The reduction is confined to test maintenance and adds no production surface.
Suite consolidation 4 test files removed; 2 shared helpers added Deleted suite scenarios move into existing owners rather than disappearing.

Technical review

Best possible solution:

Keep the shared test machinery and consolidated suites while preserving their existing safety assertions and platform gates.

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

Not applicable: the PR consolidates existing tests rather than reporting a runtime bug; validation results are reported in its body and were not independently rerun.

Is this the best way to solve the issue?

Yes: shared helpers and parameterized scenarios reduce duplication while retaining the inspected failure cases, assertions, and platform gates.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no user-visible runtime change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied Repository State identifies a trusted MEMBER author, and the branch changes only test organization with no changed production behavior. Reported test results are supplemental validation; no stored-data contract changes.

Label justifications:

  • P3: This is test-maintenance cleanup with no user-visible runtime change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied Repository State identifies a trusted MEMBER author, and the branch changes only test organization with no changed production behavior. Reported test results are supplemental validation; no stored-data contract changes.

Evidence

What I checked:

  • Pinned introduced scope: The complete introduced diff changes only 14 test paths: 1,186 additions and 1,748 deletions. Production source, native code, dependencies, and workflows have no introduced changes. (f6aa0da3e7da)
  • Settlement and copy coverage retained: Compared the deleted helpers and wrapper suite against their replacements. Both atomic API modes retain the operation/cleanup/close combinations and falsy-value identity assertions; copy wrapper scenarios retain close ordering and operation-error precedence. (test/helpers/copy-close-precedence.ts:115, f6aa0da3e7da)
  • ZIP isolation and archive boundaries: The merged ZIP suite retains ownership, reuse, timing, native-mode, and decoder-disagreement cases. Its method-corruption case replaces the compression object rather than mutating shared state. The retained TAR pipeline case still checks the same truncated-header error plus stream destruction. (test/archive-zip-portable-metadata.test.ts:198, f6aa0da3e7da)
  • Current-main necessity check: Live main advanced to 6e2bf2c through a documentation consolidation with no affected test paths. This PR remains open and unmerged; its test consolidation is still distinct work. (6e2bf2c8f162)
  • Area-history routing: Main-history logs connect Peter Steinberger to prior atomic ownership, copy settlement, and ZIP admission work. GitHub commit metadata maps the earlier author to steipete. Deeper blame and some historical blob comparisons failed because unavailable objects could not be retrieved; no source-line introduction attribution is claimed. (test/atomic-temp-owner-settlement.test.ts, 46efdfda202a)
  • Validation and discussion: The supplied complete body reports 525 registered tests before and after, 516 passes, nine native-gated skips, and passing TypeScript and lint checks. No human reviews or review comments were supplied or returned by the live review endpoint. Tests were not executed during this read-only review; git diff --check passed and the checkout remained clean. (f6aa0da3e7da)

Likely related people:

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

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.

steipete added a commit that referenced this pull request Oct 1, 2026
…#814)

Share atomic settlement and copy close-precedence test machinery, merge the copy-wrapper and three ZIP admission siblings into their owners, and table copy-fallback guard, publication target-swap, preserved-mode, and TAR boundary twins. 525 registered tests before and after; tests only, net -562 lines and four fewer files.
@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Landed on main as e4d9f9b through the batch PR #816 (rebase merge, one commit per original PR), to avoid ten serial up-to-date CI cycles. Content is identical to this PR's reviewed diff.

@steipete steipete closed this Oct 1, 2026
steipete added a commit that referenced this pull request Oct 1, 2026
…#814)

Share atomic settlement and copy close-precedence test machinery, merge the copy-wrapper and three ZIP admission siblings into their owners, and table copy-fallback guard, publication target-swap, preserved-mode, and TAR boundary twins. 525 registered tests before and after; tests only, net -562 lines and four fewer files.
@steipete
steipete deleted the steipete/deslop-r5-tests-archive branch October 1, 2026 17:08
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant