Skip to content

fix(review): ignore workflow files in data-model detection - #1267

Merged
brokemac79 merged 1 commit into
mainfrom
codex/csw-142-workflow-classifier
Aug 27, 2026
Merged

brokemac79 merged 1 commit into
mainfrom
codex/csw-142-workflow-classifier

Conversation

@brokemac79

@brokemac79 brokemac79 commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Exclude only .github/workflows/** from OpenClaw stored-data-model candidate paths.
  • Keep production-source, semantic-documentation, migration, missing-patch, and truncated-list handling unchanged.
  • Add the real openclaw/openclaw#119762 workflow carrier as a regression fixture, plus workflow-only and workflow-to-production rename coverage.

Problem

The full eight-file pull-files response for openclaw/openclaw#119762 included workflow metadata in .github/workflows/openclaw-live-and-e2e-checks-reusable.yml. The data-model classifier treated that CI-only YAML as vector/embedding metadata and imposed a stored-data migration-proof gate even though the changed file cannot define an OpenClaw persisted data model.

Contributor PR #1081 identified this false-positive family. This replacement deliberately takes only the path-boundary fix; it does not adopt the broader lexical trade-offs from that PR.

Implementation

isDataModelCandidatePath now excludes .github/workflows/** before semantic matching. The SQLite schema classifier remains on its existing production-source path logic. No OpenClaw workflow was modified.

Rename sides are still considered independently: a rename from a workflow into src/storage/session-state.ts with no patch remains unknown-data-model-change and therefore fail-closed.

Real Behavior Proof

Claim: CI workflow vocabulary no longer produces an OpenClaw stored-data warning, while conservative detection still holds for production persistence, semantic documentation, workflow-to-production renames, missing production patches, and truncated pull-file lists.

Exercised surface: the built dist/clawsweeper-change-detection.js classifier at head 7070f5175eaf3adeba4d9fec4ebb97298d14703f.

Scenario and result: after pnpm run build:all, a controlled Node transcript fetched the live public GitHub pull-files response for #119762 (carrierFiles: 8) and produced carrier: { change: false, surfaces: [] }. In the same execution, semantic docs and production persistence remained change: true; the workflow-to-production rename and missing production patch both remained unknown-data-model-change; and the truncated file-list case remained unknown-truncated-pull-files.

Commands/environment: Docker Desktop Linux engine via Crabbox provider=local-container, image mcr.microsoft.com/playwright:v1.60.0-noble, exact head 7070f5175eaf3adeba4d9fec4ebb97298d14703f; crabbox run --provider local-container --local-container-image mcr.microsoft.com/playwright:v1.60.0-noble --no-hydrate --timing-json --script C:/clawsweeper-work/notes/csw-142-aws-crabbox-proof.sh. The in-container script enabled Corepack in the unprivileged user's $HOME/.local/bin, ran pnpm install --frozen-lockfile, pnpm run build:all, the live built-classifier transcript, then node --test test/pr-surface-policy.test.ts (41/41 pass). Local focused validation also ran pnpm run lint, focused oxfmt --check, and git diff --check.

Artifact/trace: Docker-backed Crabbox run run_b498cc9e3038, lease cbx_d237f8be92a9 (golden-crab-8c3e), exited 0: install 5.101s, build 3.509s, live-carrier 433ms, focused tests 349ms; total command 10.269s. The lease was released automatically after success. test/fixtures/persistence-classifier-119762.json is the fixed carrier regression; the main proof is reproduced from the live public REST payload, not only that fixture. The local read-only committed-range ClawSweeper artifact was artifacts/csw-142-local-range/0.md, reviewing base 7f9e3f99e312dc14e17084e66f23c1590e559b9e and head 7070f5175eaf3adeba4d9fec4ebb97298d14703f; it found no code or security finding.

Redacted Docker-backed transcript:

provider=local-container image=mcr.microsoft.com/playwright:v1.60.0-noble
run=run_b498cc9e3038 lease=cbx_d237f8be92a9 slug=golden-crab-8c3e
workdir=/work/crabbox/cbx_d237f8be92a9/clawsweeper
CRABBOX_PHASE:install
Done in 3s using pnpm v11.10.0
CRABBOX_PHASE:build
$ tsc -p tsconfig.json
$ tsc -p tsconfig.repair.json
$ tsc -p tsconfig.dashboard.json
CRABBOX_PHASE:live-carrier
{"head":"7070f5175eaf3adeba4d9fec4ebb97298d14703f","carrierFiles":8,
 "carrier":{"change":false,"surfaces":[]},
 "scenarios":{"workflowOnly":{"change":false,"surfaces":[]},
 "semanticDocs":{"change":true},"productionPersistence":{"change":true},
 "workflowToProductionRename":{"change":true,"surfaces":["unknown-data-model-change: src/storage/session-state.ts"]},
 "missingStoragePatch":{"change":true,"surfaces":["unknown-data-model-change: src/storage/session-state.ts"]},
 "truncatedList":{"change":true,"surfaces":["unknown-truncated-pull-files"]}}}
CRABBOX_PHASE:focused-tests
tests 41; pass 41; fail 0; skipped 0
run summary sync=12.139s command=10.269s exit=0
leaseStopped=true

Limits: The proof covers the data-model classifier boundary, not a change to any OpenClaw workflow. It fetched only the public GitHub pull-files payload for #119762 and installed the repository's locked dependencies inside the temporary container; it performed no credentialed GitHub mutation, workflow dispatch, or deployment. A separately requested AWS Crabbox attempt (run_7cc45bfec884) is alternative-provider evidence only and is not claimed as satisfaction of this Docker local-container gate.

Validation

  • pnpm run build:all
  • node --test test/pr-surface-policy.test.ts — 41 pass, 0 fail
  • exact-head built-classifier proof against live #119762 pull-files payload and all five conservative scenarios above
  • pnpm run lint
  • pnpm exec oxfmt --check src/clawsweeper-change-detection.ts test/pr-surface-policy.test.ts test/fixtures/persistence-classifier-119762.json
  • git diff --check origin/main...HEAD
  • pnpm run review -- --local-range --target-repo openclaw/clawsweeper --base origin/main --artifact-dir artifacts/csw-142-local-range — complete, high confidence, no review comments

The repository-wide pnpm run check stopped at the formatter reporting issues across hundreds of untouched repository files; focused formatting for all changed files is clean. This is baseline noise, not changed by this branch.

Codex Review

  • Dirty-patch review: codex review --uncommitted after formatting — no accepted/actionable findings.
  • Committed-base review: codex review --base origin/main — no actionable defects; focused detector suite passes after build.
  • One earlier suggestion to exclude .github/actions/setup-codex/action.yml was rejected after direct built-classifier reproduction: that .yml is not a production candidate and returns { change: false, surfaces: [] } already.

Risks and Rollout

The exclusion is intentionally limited to .github/workflows/** in the data-model classifier. It does not exempt workflows from configuration, security, or workflow review, and it does not relax any production persistence or incomplete-payload fail-closed guard.

No merge or automerge is requested by this PR.

Links

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. 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 Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 4:11 PM ET / 20:11 UTC.

ClawSweeper review

What this changes

The PR excludes .github/workflows/** files from stored-data-model candidate detection while preserving production, documentation, rename, and incomplete-payload safeguards.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for maintainer review: the exact introduced change narrowly fixes a source-proven false positive, retains fail-closed handling for production renames and truncated data, and now has sufficient exact-head runtime proof.

Priority: P2
Reviewed head: 7070f5175eaf3adeba4d9fec4ebb97298d14703f

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, source-consistent automation fix with strong exact-head runtime evidence and no actionable review finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body provides an exact-head Docker-backed Crabbox terminal transcript showing the live carrier is clean and conservative classifier scenarios plus 41 focused tests pass.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body provides an exact-head Docker-backed Crabbox terminal transcript showing the live carrier is clean and conservative classifier scenarios plus 41 focused tests pass.
Evidence reviewed 6 items Introduced boundary is narrow: The introduced filter removes only .github/workflows/** before persistence signal matching; rename sides and unknown-data handling remain in the same control flow.
Current-main false-positive path is source-reproducible: Before this PR, workflow paths passed the generic production-path predicate and changed lines containing metadata reached vector/embedding detection; the supplied carrier has that exact shape.
Regression coverage preserves conservative cases: Tests cover the live workflow carrier, workflow-only persistence vocabulary, and a workflow-to-production rename with no patch, which remains an unknown data-model change.
Findings None None.
Security None None.

Live Verification

Command: pnpm run build:all && node --test test/pr-surface-policy.test.ts

Result: PASS (completed)

$ pnpm run build && pnpm run build:repair && pnpm run build:dashboard
$ tsc -p tsconfig.json
$ tsc -p tsconfig.repair.json
$ tsc -p tsconfig.dashboard.json
✔ config surface reports force human review instead of automerge pass (2.718393ms)
✔ config surface reports preserve security-sensitive markers (0.771088ms)
✔ config surface detector finds schema and plugin manifest additions (1.220263ms)
✔ config surface detector ignores non-semantic docs wording (0.227231ms)
✔ config surface detector finds removed schema keys (0.216515ms)
✔ config surface detector finds schema assembly changes (0.16617ms)
✔ config surface detector fails closed for schema continuation changes (0.274062ms)
✔ config surface detector fails closed for missing patches (0.144998ms)
✔ config surface detector fails closed for truncated file patches (0.263236ms)
✔ config surface detector fails closed for renamed config surface files (0.198859ms)
✔ config surface detector fails closed for truncated pull files (0.184056ms)
✔ tooling diagnostic and subprocess regression do not produce a stored-data warning (13.883797ms)
✔ real #119762 workflow metadata carrier does not produce a stored-data warning (0.176765ms)
✔ bundled hook prose does not become a persistence warning or migration gate (7.076841ms)
✔ Markdown persistence contracts and structured frontmatter remain detectable (1.098841ms)
✔ data model detector scopes colocated test serialization (0.144968ms)
✔ data model detector scopes test setup with a missing patch (0.054702ms)
✔ data model detector scopes fixture with a truncated patch (0.052769ms)
✔ data model detector scopes example storage setup (0.039569ms)
✔ data model detector scopes test to production rename with a missing patch (0.055924ms)
✔ data model detector scopes production to test rename with serialization removed (0.120911ms)
✔ data model detector scopes production to fixture rename with a missing patch (0.064096ms)
✔ data model detector scopes truncated file list containing only test setup (0.047802ms)
✔ data model detector scopes workflow-only persistence vocabulary (0.049545ms)
✔ data model detector scopes workflow to production rename with a missing patch (0.052159ms)
✔ data model detector finds production persistence and semantic docs changes in mixed diffs (0.431388ms)
✔ data model detector ignores query-only and non-semantic docs changes (0.447673ms)
✔ SQLite schema detector finds production table changes and ignores non-schema SQL (0.904589ms)
✔ production path classification preserves test segment and basename boundaries (0.216966ms)
✔ production path classification is bounded for repeated test markers (0.560402ms)
✔ SQLite schema warning is visible for table changes and absent otherwise (2.356751ms)
✔ data model detector flags path-hinted persisted field declarations (0.400591ms)
✔ data model detector fails closed for missing and truncated likely-surface patches (0.226179ms)
✔ data model reports force human review without migration proof (3.467079ms)
✔ data model warnings escape marker-like surface filenames (1.488747ms)
✔ data model reports can pass when migration proof is recorded (2.701569ms)
✔ data model reports can pass when no migration is required and compatibility is verified (2.703382ms)
✔ data model reports reject explicitly negative migration proof (3.349181ms)
✔ data model reports reject requested future migration proof (2.068688ms)
✔ data model reports reject planned migration tests as proof (1.021936ms)
✔ data model reports reject hypothetical compatibility proof (1.064219ms)
ℹ tests 41
ℹ suites 0
ℹ pass 41
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 260.68902

Assertions:

  • NOT OBSERVED expect_output: # pass — command exited successfully; expected output was not observed in the captured pane

How this fits together

ClawSweeper’s review classifier reads pull-request file paths and patches to decide whether stored-data migration evidence is required. Its output is written into review reports and affects review, repair, and automerge eligibility.

flowchart LR
  A[Pull-file paths and patches] --> B[Stored-data classifier]
  B --> C[Candidate path boundary]
  C --> D[Persistence-signal analysis]
  D --> E[Review report]
  E --> F[Review and repair eligibility]
Loading

Before merge

  • Resolve merge risk (P1) - Merging changes automation policy: workflow-only OpenClaw PRs will no longer receive a stored-data migration gate from workflow vocabulary alone; the retained production-rename and truncated-payload cases constrain that boundary.
  • Complete next step (P2) - No discrete repair is needed; the patch is ready for ordinary maintainer review with sufficient real-behavior proof.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch scope 3 files affected; production +9/-4, tests and fixture +37 The implementation is a single candidate-path boundary change with focused regression coverage.

Merge-risk options

Maintainer options:

  1. Land the scoped classifier boundary (recommended)
    Accept the intentional workflow-only gate removal, supported by the exact carrier proof and preservation tests for production and unknown-evidence inputs.

Technical review

Best possible solution:

Retain the scoped workflow-path exclusion and its regression cases so workflow metadata cannot block unrelated OpenClaw PRs while incomplete or production persistence evidence remains fail-closed.

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

Yes: current-main source routes workflow paths through generic persistence matching, and the supplied carrier patch contains metadata, which matches the vector/embedding detector. The PR body also provides an exact-head after-fix transcript.

Is this the best way to solve the issue?

Yes: filtering only workflow definitions at candidate selection fixes the false positive without weakening production-source, documentation, rename, or truncation safeguards.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7f9e3f99e312.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides an exact-head Docker-backed Crabbox terminal transcript showing the live carrier is clean and conservative classifier scenarios plus 41 focused tests pass.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body provides an exact-head Docker-backed Crabbox terminal transcript showing the live carrier is clean and conservative classifier scenarios plus 41 focused tests pass.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This fixes an incorrect review-automation gate with limited, non-runtime blast radius.
  • merge-risk: 🚨 automation: The changed classifier directly controls whether review and automation paths require stored-data evidence.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body provides an exact-head Docker-backed Crabbox terminal transcript showing the live carrier is clean and conservative classifier scenarios plus 41 focused tests pass.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides an exact-head Docker-backed Crabbox terminal transcript showing the live carrier is clean and conservative classifier scenarios plus 41 focused tests pass.

Evidence

What I checked:

  • Introduced boundary is narrow: The introduced filter removes only .github/workflows/** before persistence signal matching; rename sides and unknown-data handling remain in the same control flow. (src/clawsweeper-change-detection.ts:84, 7070f5175eaf)
  • Current-main false-positive path is source-reproducible: Before this PR, workflow paths passed the generic production-path predicate and changed lines containing metadata reached vector/embedding detection; the supplied carrier has that exact shape. (src/clawsweeper-change-detection.ts:196, 7f9e3f99e312)
  • Regression coverage preserves conservative cases: Tests cover the live workflow carrier, workflow-only persistence vocabulary, and a workflow-to-production rename with no patch, which remains an unknown data-model change. (test/pr-surface-policy.test.ts:276, 7070f5175eaf)
  • Automation consumer confirmed: Report generation records this classifier result as data_model_change, and orchestration requires human review when that field is true without upgrade proof. (src/clawsweeper-report-document.ts:581, 7070f5175eaf)
  • Feature history: The detector’s recent history includes the original schema-warning work by Patrick Erichsen and Peter Steinberger’s earlier fixture false-positive refinement, establishing the relevant ownership trail. (src/clawsweeper-change-detection.ts:76, ff813ac2fa76)
  • Exact-head real-behavior proof: The PR body includes a redacted Docker-backed Crabbox local-container transcript for the reviewed head: it built the classifier, fetched the public carrier for feat(release): validate Windows-node releases and main openclaw#119762, observed no stored-data warning, and passed 41 focused tests. (7070f5175eaf)

Likely related people:

  • Patrick Erichsen: Introduced the SQLite schema-warning feature whose detector is now being refined. (role: feature introducer; confidence: high; commits: a8b2debb75fd; files: src/clawsweeper-change-detection.ts, test/pr-surface-policy.test.ts)
  • Peter Steinberger: Previously refined persistence false-positive handling and recently updated PR-introduction evidence around this review surface. (role: recent area contributor; confidence: high; commits: ff813ac2fa76, 2129a78a502e; files: src/clawsweeper-change-detection.ts, test/pr-surface-policy.test.ts)
  • Vincent Koc: Recently hardened path classification in the same detector module. (role: adjacent hardening contributor; confidence: medium; commits: a22ff989bdf4; files: src/clawsweeper-change-detection.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-27T19:11:20.144Z sha 7070f51 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-27T19:53:07.772Z sha 7070f51 :: needs real behavior proof before merge. :: none

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 27, 2026
@brokemac79
brokemac79 merged commit 5442b1a into main Aug 27, 2026
31 checks passed
@brokemac79
brokemac79 deleted the codex/csw-142-workflow-classifier branch August 27, 2026 21:17
@brokemac79

Copy link
Copy Markdown
Contributor Author

Landed in 5442b1a. Thank you @masatohoshino for identifying the #119762 workflow false positive and helping establish the investigation that led to this conservative replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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