Skip to content

test(build): import stamp writers from their shared owner - #133974

Merged
steipete merged 2 commits into
mainfrom
codex/test-audit-build-stamp-facades
Aug 31, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/test-audit-build-stamp-facades

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Build-stamp tests import their writers through CLI entrypoints, keeping unused re-exports on those commands. The changed-file runner also relied on that incidental test import to select the build-stamp regression test.

Why This Change Was Made

Import both writers directly from their shared metadata owner and remove the CLI re-exports and inaccurate test headers. Record the build-stamp CLI’s existing regression-test owner in the selector’s exact map, since that test lives outside its conventional tooling directories. The runtime-postbuild sibling keeps its existing conventional route.

User Impact

The CLI entry guards, execution, error handling and artifact writers stay unchanged. Both filesystem tests retain every assertion and fixture, and changed-file execution retains its narrow regression target. Tooling +1/-8 (net -7); tests +2/-4 (net -2); product runtime unchanged.

Evidence

Both complete writer tests passed before and after (2 → 2). Both real CLI entrypoints also passed before and after in a temporary working directory, writing the expected timestamp fields, Git-head absence and trailing newlines. The canonical writer and packaging-path contracts were inspected.

The first hosted run, 33373379861, caught the lost selector edge: the existing build-stamp routing assertion expected src/infra/build-stamp.test.ts but received the broad tooling config. The repair preserves that assertion and adds the missing exact owner. It does not restore a test facade, introduce a fake import, or broaden discovery.

On the refreshed main composition, the unchanged routing regression reproduced the same failure before the map repair. After the repair, all 367 selector cases and both writer cases passed (369 total). Direct selector checks preserve the exact build-stamp target, the conventional runtime-postbuild target and all nine shared-metadata targets. Fresh Codex review found no actionable findings in its configured scope. The full changed-file gate also passed. Exact refreshed head 97bb4b125e5d passed CI33379626153, including the CI gate.

The review’s generic stored-data warning does not describe a changed data contract here: stamp writer implementation and serialized artifact formats are unchanged; no vector/embedding metadata or SQLite store is modified.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Aug 31, 2026
@steipete
steipete marked this pull request as ready for review August 31, 2026 08:32
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 4:46 AM ET / 08:46 UTC.

ClawSweeper review

What this changes

The PR removes build-stamp writer re-exports from CLI wrappers and updates their tests to import the writers from the shared metadata module.

Merge readiness

✅ Ready for maintainer review

The cleanup is owner-aligned and appears correct; fetched current main still has the redundant wrapper exports, so this PR remains useful and open.

Priority: P3
Reviewed head: d2c3ccde465e8c1198e1075323806af5073a6221

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, owner-aligned cleanup with no supported correctness or security finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, behavior-neutral script cleanup is exempt from the external-contributor real-behavior-proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, behavior-neutral script cleanup is exempt from the external-contributor real-behavior-proof gate.
Evidence reviewed 5 items Shared owner and retained entrypoints: The shared module owns both writer implementations; each CLI wrapper still imports its writer and retains its direct-execution guard and error exit path.
Production callers use the shared writer: The development runner and gateway-watch utility import the writer functions from the shared metadata module, while the build plan invokes the wrappers as commands.
Current main has not absorbed the cleanup: At fetched main, both CLI wrappers still re-export writer symbols and the focused tests still import through those wrappers.
Findings None None.
Security None None.

How this fits together

The build pipeline invokes two CLI entrypoints, each delegating to a shared metadata writer that creates a local stamp file. Build tooling executes the wrappers, while focused tests exercise the writer’s filesystem output.

flowchart LR
  Build[Build pipeline] --> Entry[Stamp CLI entrypoints]
  Entry --> Writer[Shared metadata writers]
  Writer --> Artifact[Local stamp files]
  Tests[Focused filesystem tests] --> Writer
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -2, Other -8. Total -10 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 2 4 -2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 0 8 -8
Total 4 2 12 -10

Review metrics

Metric Value Why it matters
Production vs test delta production −8, tests −2 (net −10) The patch deletes two wrapper facades and test headers without adding runtime behavior or configuration surface.

Stored data model

Persistent data-model change detected: vector/embedding metadata: scripts/build-stamp.mts, vector/embedding metadata: scripts/runtime-postbuild-stamp.mts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep the CLI files as execution-only wrappers and the shared metadata module as the sole writer API, with focused tests importing that owner directly.

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

Not applicable: this is a behavior-neutral internal cleanup; source inspection shows both command paths still delegate to the same writers.

Is this the best way to solve the issue?

Yes: directly importing the shared owner removes unused CLI facades while retaining the command entrypoints used by build tooling.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 253ad3e545b7.

Labels

Label justifications:

  • P3: This is a low-risk internal cleanup with no product behavior, configuration, or data-model 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: This maintainer-authored, behavior-neutral script cleanup is exempt from the external-contributor real-behavior-proof gate.

Evidence

What I checked:

  • Shared owner and retained entrypoints: The shared module owns both writer implementations; each CLI wrapper still imports its writer and retains its direct-execution guard and error exit path. (scripts/lib/local-build-metadata.mts:44, d2c3ccde465e)
  • Production callers use the shared writer: The development runner and gateway-watch utility import the writer functions from the shared metadata module, while the build plan invokes the wrappers as commands. (scripts/run-node.mts:23, d2c3ccde465e)
  • Current main has not absorbed the cleanup: At fetched main, both CLI wrappers still re-export writer symbols and the focused tests still import through those wrappers. (scripts/build-stamp.mts:7, 253ad3e545b7)
  • Feature provenance: Merged PR 133470 added the shared owner and both wrappers together; raw-parent inspection shows the relevant files were new in that commit. (scripts/lib/local-build-metadata.mts:44, e5cae7119158)
  • Introduced patch scope: The verified PR delta deletes only wrapper re-exports and stale comments, then changes two tests to import the existing shared implementation; no whitespace error was found. (scripts/build-stamp.mts:7, d2c3ccde465e)

Likely related people:

  • unknown: The blamed commit carries this line unchanged from a recorded parent; no introducing author is attributed. (role: carried-forward source line; 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 (1 earlier review cycle)
  • reviewed 2026-08-31T08:39:16.508Z sha d2c3ccde465e8c1198e1075323806af5073a6221 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/test-audit-build-stamp-facades branch from d2c3ccd to 97bb4b1 Compare August 31, 2026 09:50
@steipete steipete self-assigned this Aug 31, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The refreshed head adds the explicit build-stamp test owner required by the unchanged routing regression. All369 routing/writer cases, direct selector plans, the complete changed-file gate, fresh five-file Codex review and exact-head CI33379626153 passed. The original CLI/writer behavior is unchanged.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit 422f40d into main Aug 31, 2026
172 checks passed
@steipete
steipete deleted the codex/test-audit-build-stamp-facades branch August 31, 2026 10:38
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
…33974)

* test(build): remove unused stamp CLI re-exports

* fix(test): preserve build-stamp regression routing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XS 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