Skip to content

improve: reduce package profile test setup - #155972

Merged
steipete merged 1 commit into
mainfrom
codex/test-package-profile-tooling-reuse
Sep 22, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-package-profile-tooling-reuse

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Package Acceptance profile tests construct a target Git repository and command shims that their workflow step never uses.

User Impact

No user-visible behavior changes. The affected tests do less fixture setup while preserving all profile inputs and assertions.

Why This Change Was Made

Use the existing frozen tooling fixture directly, with a separate tracked temporary directory for each invocation. The same frozen tooling template and private copy lifecycle remain in place; only unused target setup is removed.

Evidence

  • Before and after: all six selected cases passed, with identical ordered case outcomes (555 other cases filtered).
  • Git Trace2 recorded 32 unused target setup subprocess starts before and zero afterward across eight profile invocations.
  • One local Node 24.19 comparison measured 9.13s before and 8.32s after. This is a single pair, not a repeatability or whole-suite performance claim.
  • Mapped changed checks, formatting, diff checks, and independent review passed.
  • Two lines replaced by two lines; no assertion or production changes.

@clawsweeper

clawsweeper Bot commented Sep 22, 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.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 22, 2026
@steipete
steipete marked this pull request as ready for review September 22, 2026 21:40
@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 Sep 22, 2026
@clawsweeper

clawsweeper Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 5:46 PM ET / 21:46 UTC.

ClawSweeper review

What this changes

The package acceptance profile tests reuse the existing tooling fixture directly, avoiding unused target repositories and command shims while preserving assertions.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful, narrowly scoped cleanup that current main still lacks. No actionable correctness or security defects were found.

Priority: P3
Reviewed head: 3349ec90dfd8947d65d3c6687bfe6bf292ab44ee

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused cleanup with unchanged coverage, preserved isolation, and proportionate reported validation.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a maintainer-authored test-only cleanup, so external-contributor runtime proof is not required; the reported focused runs cover the changed fixture path, and 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 maintainer-authored test-only cleanup, so external-contributor runtime proof is not required; the reported focused runs cover the changed fixture path, and no stored-data contract changes.
Evidence reviewed 6 items Introduced change preserves the tested boundary: The pinned merge-base-to-head diff replaces only fixture construction. The workflow script, working directory within the tooling copy, environment, output parsing, and assertions remain unchanged.
Isolation and cleanup remain intact: The existing tooling helper copies its cached template into each invocation's private directory. The afterEach directory tracker still owns cleanup. The old wrapper created a separate target repository and shims, but this caller used neither its target nor its modified PATH.
Workflow needs only the retained tooling: The Select acceptance profile step verifies the tooling root and SHA, calls the package profile selector, and writes outputs. It does not consume the discarded target repository. Its tooling verification and production behavior are unchanged.
Findings None None.
Security None None.

How this fits together

Package Acceptance selects validation suites from profile inputs. These tests execute its actual workflow step against isolated tooling copies and check the resulting suite selections and errors.

flowchart LR
  A[Profile test inputs] --> B[Tracked temporary directory]
  C[Cached tooling template] --> D[Private tooling copy]
  B --> D
  D --> E[Workflow profile selection]
  A --> E
  E --> F[Output and error assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 2 2 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 2 2 0

Review metrics

Metric Value Why it matters
Avoided fixture work Reported 32 → 0 target-setup subprocess starts across 8 invocations The removed work explains the optimization without relying on a single timing comparison.

Technical review

Best possible solution:

Keep the existing private tooling-copy lifecycle and profile assertions while removing setup that the profile step never consumes.

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

Not applicable to a product bug; source inspection confirms the unused fixture setup, and the PR reports a before/after subprocess comparison.

Is this the best way to solve the issue?

Yes. Reusing the existing tooling helper is the narrowest change and preserves per-invocation isolation, cleanup, and workflow-boundary assertions.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This reduces internal test setup without changing product behavior or test assertions.
  • 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 maintainer-authored test-only cleanup, so external-contributor runtime proof is not required; the reported focused runs cover the changed fixture path, and no stored-data contract changes.

Evidence

What I checked:

  • Introduced change preserves the tested boundary: The pinned merge-base-to-head diff replaces only fixture construction. The workflow script, working directory within the tooling copy, environment, output parsing, and assertions remain unchanged. (test/scripts/package-acceptance-workflow.test.ts:3620, 3349ec90dfd8)
  • Isolation and cleanup remain intact: The existing tooling helper copies its cached template into each invocation's private directory. The afterEach directory tracker still owns cleanup. The old wrapper created a separate target repository and shims, but this caller used neither its target nor its modified PATH. (test/scripts/package-acceptance-workflow.test.ts:250, 3349ec90dfd8)
  • Workflow needs only the retained tooling: The Select acceptance profile step verifies the tooling root and SHA, calls the package profile selector, and writes outputs. It does not consume the discarded target repository. Its tooling verification and production behavior are unchanged. (.github/workflows/package-acceptance.yml:545, 3349ec90dfd8)
  • Current main still needs this cleanup: The fetched main retains the full workflow fixture call. Raw test-merge parents match the pinned main followed by the pinned PR head, and its comparison against main contains the same focused fixture replacement. This is not already implemented on the reviewed main; no shipped-fix claim is made. (test/scripts/package-acceptance-workflow.test.ts:3620, d30f66fc26f9)
  • Relevant prior fixture work: Current-main history includes earlier fixture optimizations by Peter Steinberger. GitHub commit metadata identifies steipete and shows the existing tooling helper and the analogous release-input caller conversion. Some older local blobs were unavailable; GitHub commit patches supplied the relevant history without establishing deeper feature-introduction claims. (test/scripts/package-acceptance-workflow.test.ts:250, be4eb831c629)
  • Reported validation and review limits: The captured PR body reports identical outcomes for six selected cases across eight profile invocations, 32 removed target-setup subprocess starts, and one Node 24.19 timing pair of 9.13s before versus 8.32s after. These are contributor-reported measurements, not independently repeated results. Read-only diff checks passed and the checkout remained clean; tests were not executed under this review's restrictions. (3349ec90dfd8)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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
steipete merged commit 7d7f977 into main Sep 22, 2026
179 checks passed
@steipete
steipete deleted the codex/test-package-profile-tooling-reuse branch September 22, 2026 23:45
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 22, 2026
* commit '7d7f977ccfc1ac177526232e4f4960febd010015': (91 commits)
  test: avoid unused target setup in package profile fixtures (#155972)
  fix(worktrees): batch snapshot metadata reads
  test(plugin-state): distinguish borrowed and foreign lifecycle owners
  refactor(agents): share external harness session and attempt machinery (#152181)
  chore(i18n): refresh native locales (#156006)
  chore(test): retain Doctor fixture settlement diagnostics (#155944)
  perf(codex): reuse unchanged inference request bytes (#155987)
  perf(test): prepare snapshot ownership subprocess imports (#155973)
  perf(test): consolidate channel registry coverage (#155014)
  fix(runtime): preserve Node worker dependencies and cleanup diagnostics (#155292)
  perf(test): prepare worktree GC child runtime (#155928)
  fix(ui): open browser cards after delayed panel renders (#153253)
  fix(update): retain the running updater by hard link instead of copying the package (#155977)
  feat(decisions): add explicit evaluation and Labs opt-in foundation (#155134)
  fix(state): preserve lifecycle custody across worker dispatch
  improve: reuse shared tooling fixtures and defer legacy updater proof (#155731)
  improve(ui): reduce real-Gateway test preparation (#155979)
  perf(state): move session RPC SQL off the Gateway main thread (#155740)
  docs(freebsd): explain native Codex runtime limits (#155980)
  fix(qa): count Code Mode nested tool activity as transcript tool evidence (#155976)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 23, 2026
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
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. 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