Skip to content

refactor(native): remove empty pre-observation callbacks - #770

Merged
steipete merged 2 commits into
mainfrom
codex/native-preobservation-seams
Sep 30, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/native-preobservation-seams

Conversation

@steipete

@steipete steipete commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Remove four private native callbacks whose production callers always supplied an empty closure. They ran before the first filesystem observation, so race tests can make their substitutions immediately before calling the operation while retaining the original expected identity. The identity-checked Unix rename now owns its body directly instead of forwarding through a second function.

The exported native methods, descriptor ownership, identity/type checks, and syscall/error ordering are preserved. Required-native removal and overwrite integration coverage is explicit across the native platform matrix and both musl architectures. The integration includes #771's Windows nonempty-directory error fix and its regression assertions.

At d27b43a, managed P2 review, all nine full checks, six package-consumer jobs, nine native lanes, mutation, and coverage passed. CodeQL was skipped because this PR is draft. Installed Windows Node 22/24 qualification passed, including the nonempty-directory preservation cases. The original counter reports 56,941 production lines, 11 fewer than base 9543f52; main receives no credit before merge.

Performance hold

Keep this PR in draft. Performance remains unresolved:

  • The original Linux comparison cleared all four source and identical-artifact control bounds. The original shared-Mac comparison was inconclusive. Those results retain their original source/artifact identities.
  • The first integrated Windows campaign retained all 48 processes, 57,600 measured calls and 720 warmups. All three source upper bounds passed the 5% limit, but the empty-directory identical-artifact control interval was [0.944405, 0.997202], outside the required [1/1.05, 1.05] range. Independent raw analysis confirms an inconclusive result. No measurements were discarded or rerun.
  • Two separately registered Mac suitability trials passed functional qualification but failed fixed environmental admission before launching any calibration or comparison timing process. The later five-CPU trial used fresh integrated builds and private .noindex paths. Neither provides performance clearance or a causal explanation for the load.

No speedup or landing clearance is claimed from the source reduction, passing correctness checks, or benchmark smoke workflow.

@steipete
steipete requested a review from a team as a code owner September 29, 2026 20:20
@clawsweeper

clawsweeper Bot commented Sep 29, 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 Sep 29, 2026
@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 30, 2026, 7:24 PM ET / 23:24 UTC (Revision 6).

ClawSweeper review

What this changes

The branch removes unused callbacks from native Root removal and overwrite moves, updates race tests, and expands required-native CI coverage.

Merge readiness

✅ Ready for maintainer review

Keep open. Current main and v0.21.3 retain the callbacks, while the merged Windows error fix addresses a separate behavior. The previous Windows test compilation finding is fixed at this head; no new blocking defect was found.

Priority: P3
Reviewed head: 8fb1d71dc5089e5232d64e9883f5013f1beaae21

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused patch retains its safety checks and fixes the previous Windows compilation defect, with ordinary platform validation pending.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The repository-member proof gate does not apply. The PR reports earlier installed Windows qualification for native Root operations, and the current head repairs only two Windows test calls; 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 repository-member proof gate does not apply. The PR reports earlier installed Windows qualification for native Root operations, and the current head repairs only two Windows test calls; no stored-data contract changes.
Evidence reviewed 9 items Introduced native change: The introduced diff removes empty callbacks while retaining name validation, identity checks, and filesystem operations.
Previous finding repaired: The final commit changes both Windows nonempty-directory test calls from the removed helper to unlink_entry; their preservation assertions remain.
Production boundary: The Root removal path obtains the native binding, captures removal admission, and passes the retained parent descriptor to the native helper.
Findings None None.
Security None None.

How this fits together

Node.js Root operations pass retained parent handles and expected file identities to native filesystem helpers. The helpers check the selected entry before removing or renaming it, then return either a result or an error.

flowchart LR
A[Root removal or overwrite move] --> B[Retained parent handle]
B --> C[Native filesystem helper]
C --> D[Check name and identity]
D --> E[Unlink or rename]
D --> F[Reject changed entry]
E --> G[Operation result]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

None.

Technical review

Best possible solution:

Keep the native name and identity checks intact and qualify the callback-free helpers through the expanded platform matrix.

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

Not applicable: this is a behavior-preserving cleanup. The relevant native calls and race-test paths are identifiable in source.

Is this the best way to solve the issue?

Yes. Removing private callbacks supplied only with empty closures is a narrow cleanup, and the current head preserves the checks around the filesystem operations.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 851bd85a4013.

Labels

Label changes:

  • add P3: This is a focused internal cleanup with no established user-facing regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 repository-member proof gate does not apply. The PR reports earlier installed Windows qualification for native Root operations, and the current head repairs only two Windows test calls; no stored-data contract changes.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.

Label justifications:

  • P3: This is a focused internal cleanup with no established user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 repository-member proof gate does not apply. The PR reports earlier installed Windows qualification for native Root operations, and the current head repairs only two Windows test calls; no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 682fe75 adds native/src/root_remove.rs:33 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 682fe7589aa3; files: native/src/root_remove.rs)
  • Jason (Json): 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.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-29T20:23:15.195Z sha 66b80a1 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-29T20:43:29.050Z sha 66b80a1 :: blocked before merge. :: none
  • reviewed 2026-09-29T21:57:37.175Z sha d27b43a :: blocked before merge. :: none
  • reviewed 2026-09-29T23:26:12.957Z sha d27b43a :: blocked before merge. :: none
  • reviewed 2026-09-30T23:14:43.487Z sha fbd8fba :: blocked before merge. :: [P1] Update the remaining Windows calls to the renamed helper

@steipete
steipete marked this pull request as draft September 29, 2026 20:38
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. label Sep 29, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

The coordinator has reviewed this diff and lifted the performance hold. Production callers only passed || {}; the removed hooks ran after name validation and before the first filesystem observation, so staging each test swap immediately before the call exercises the same race state. Removing a no-op closure has no plausible slowdown mechanism. The inconclusive study also failed an identical-artifact control, indicating environmental noise.

@steipete
steipete force-pushed the codex/native-preobservation-seams branch from d27b43a to fbd8fba Compare September 30, 2026 23:10
@steipete
steipete marked this pull request as ready for review September 30, 2026 23:10
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Sep 30, 2026
@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. and removed P2 Normal priority bug or improvement with limited blast radius. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Sep 30, 2026
@steipete
steipete merged commit ed0ef44 into main Sep 30, 2026
48 checks passed
@steipete
steipete deleted the codex/native-preobservation-seams branch September 30, 2026 23:36
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