Skip to content

refactor: delete verified dead surface - #1106

Merged
steipete merged 2 commits into
mainfrom
steipete/delete-dead-surface
Aug 10, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/delete-dead-surface

Conversation

@steipete

@steipete steipete commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Delete 12 independently verified dead surfaces while preserving the live owner for each behavior. This removes 1,428 net lines (61 additions, 1,489 deletions) and does not add a compatibility layer for code that had no production callers.

The accepted P1 review caught a would-be outage before merge: deleting the issue-implementation workflow's ignored model input left the viable-issue caller sending model=internal. GitHub rejects workflow-dispatch payloads containing undeclared inputs, so that caller would have stopped every viable issue-implementation dispatch. This head removes the retained argument and adds a regression guard over the sweep workflow's issue-implementation dispatches.

Dead-surface evidence and live replacements

Each grep below was run at this commit and returned no matches for the deleted surface.

  1. Ignored workflow model inputs in issue-implementation intake and spam scanning.
    • Evidence: git grep -n -E 'github\.event\.inputs\.model|inputs\.model' -- .github/workflows/repair-issue-implementation-intake.yml .github/workflows/spam-scanner.yml
    • Live replacement: the workflows' existing workflow-owned model configuration and secret wiring.
  2. Duplicate import command aliases repair:import-ghcrawl and repair:import-low-signal.
    • Evidence: git grep -n -E 'repair:import-ghcrawl|repair:import-low-signal' -- package.json src scripts test .github
    • Live replacement: repair:import-gitcrawl and repair:import-gitcrawl-low-signal.
  3. Unused result-review prompt prompts/repair/review-result.md.
    • Evidence: git grep -n 'review-result.md' -- . ':!node_modules'
    • Live replacement: src/repair/review-results.ts, invoked by repair:review-results, plus schema/repair/codex-result.schema.json.
  4. Orphan assist artifact JSON Schema schema/assist-artifact.schema.json.
    • Evidence: git grep -n 'assist-artifact.schema.json' -- . ':!node_modules'
    • Live replacement: the strict runtime validator validateAssistArtifact in src/assist-artifact.ts.
  5. Orphan repair job JSON Schema schema/repair/job.schema.json.
    • Evidence: git grep -n 'schema/repair/job.schema.json' -- . ':!node_modules'
    • Live replacement: job frontmatter parsing and validation in src/repair/lib.ts, with canonical types and intent policy in domain-types.ts and job-intent.ts.
  6. Orphan recovery-advisor JSON Schema schema/repair/recovery-advisor.schema.json.
    • Evidence: git grep -n 'recovery-advisor.schema.json' -- . ':!node_modules'
    • Live replacement: deterministic recovery and Git-plumbing enforcement in execute-fix-artifact.ts and target-validation.ts.
  7. Test-only per-repository spool reader readSpooledActionEvents.
    • Evidence: git grep -n 'readSpooledActionEvents' -- src test scripts .github
    • Live replacement: production-owned readAllSpooledActionEvents; affected safety tests now exercise that real path.
  8. Second accepted-intent parser clusterIntakeIntent.
    • Evidence: git grep -n 'clusterIntakeIntent' -- src test scripts .github
    • Live replacement: acceptClusterIntakeIntent, including receipt authentication and semantic validation.
  9. Unused generated-branch compactor compactGeneratedBranchHistory and its colocated test.
    • Evidence: git grep -n -E 'compactGeneratedBranchHistory|compact-generated-branch' -- src test scripts .github package.json
    • Live replacement: compactTargetHistoryWithPlumbing in target-validation.ts, used by execute-fix-artifact.ts and covered on the live repair path.
  10. Unwired exact-review batch coordinator/publisher prototype coordinateExactReviewBatch / publishExactReviewBatch and prototype tests.
    • Evidence: git grep -n -E 'coordinateExactReviewBatch|publishExactReviewBatch' -- src test scripts .github
    • Live replacement: exact-review-batch-cli.ts, exact-review-batch-publish.yml, and the Worker-backed ExactReviewPublicationBatchStore protocol.
  11. Unused PR-title synthesis helpers commitFindingPrTitle / normalizeGithubPrTitle.
    • Evidence: git grep -n -E 'commitFindingPrTitle|normalizeGithubPrTitle|from.*pr-title' -- src test scripts .github
    • Live replacement: model-produced fix_artifact.pr_title under codex-result.schema.json, with the GitHub hard ceiling retained in execute-fix-validation.ts.
  12. Unused generic state-writer progress reporter stateWriterProgressReporter.
    • Evidence: git grep -n -E 'stateWriterProgressReporter|state-writer-progress-reporter' -- src test scripts .github
    • Live replacement: the authenticated, batch-aware exactReviewBatchStateWriterProgressReporter used by exact-review-batch-cli.ts.

The issue-implementation workflow guard intentionally changes its dispatch-input expectation from 10 to 9. That test guarded the ignored model input deleted here; the new count preserves the guard for the remaining inputs.

Workflow caller audit

The full .github, scripts, and src caller inventory found:

  • .github/workflows/sweep.yml:4728: vision-fit issue-implementation dispatch; already omitted model.
  • .github/workflows/sweep.yml:4771: viable issue-implementation dispatch; fixed here by removing -f model=internal.
  • scripts/dispatch-issue-implementation-candidates.mjs:76: strict-bug issue-implementation dispatch; already omitted model.
  • src/repair/spam-comment-intake.ts:31,240: the spam scanner's repository-dispatch payload type and builder; already send only the target/comment identifiers and max_comments, with no model field.

There is no direct gh workflow run spam-scanner.yml caller. Because no spam caller retained a deleted model argument and none was changed, no spam-scanner live dispatch was required.

Caller grep proof (exit 1/no matches):

target='(?:repair-issue-implementation-intake\.yml|spam-scanner\.yml|clawsweeper_issue_implementation|clawsweeper_spam_comment)'
danger='(?:-f[ \t]+model|model[^A-Za-z0-9_\n]{0,3}[:=])'
rg -n -U --pcre2 "$target(?:[^\n]*\n){0,24}[^\n]*$danger|$danger(?:[^\n]*\n){0,24}[^\n]*$target" .github scripts src

Behavior proof

  • Claim: all deleted code and configuration are unreachable, every retained behavior continues through its named production owner, and workflow dispatch callers no longer send the deleted model inputs.
  • Exercised surface: workflow declarations and callers, package commands, repair/runtime imports, active-surface limits, exact-review/dashboard ownership boundary, the full Node test inventory, and GitHub's real workflow-dispatch API.
  • Scenario: build the repository after deletion; run every test; grep every removed identifier/reference and all issue/spam dispatch callers; run the repository's active-surface and boundary checks; then dispatch issue-implementation intake on the PR branch with enabled=false and a unique nonexistent report path so execution fails closed before any repair/status step.
  • Environment: macOS, Node 24.19.0, pnpm repository toolchain; GitHub Actions Node 24.18.0; commit 8b87b7f4e3.
  • Observable result: full suite 3,273 tests / 3,264 passed / 0 failed / 9 skipped; every requested gate exited 0; caller grep returned no matches; GitHub accepted the real branch-ref dispatch and created a run on the exact head. The run concluded failure on the intentional report-path HTTP 404, while queue-status publication, repair-worker dispatch, and dispatch recording were all skipped.
  • Trace: dispatch command below; run 31420545428, accepted at 2026-08-10T18:43:50Z, conclusion failure (intentional fail-closed proof).
  • Limits: the live proof establishes dispatch API acceptance for the updated issue-implementation input contract. It intentionally does not execute repair behavior. No spam dispatch was run because its sole repository-dispatch caller already omitted model and needed no fix.

Dispatch proof command:

gh workflow run repair-issue-implementation-intake.yml \
  --repo openclaw/clawsweeper \
  --ref steipete/delete-dead-surface \
  -f enabled=false \
  -f target_repo=openclaw/clawsweeper \
  -f item_number=2147483647 \
  -f candidate_kind=strict_bug \
  -f report_repo=openclaw/clawsweeper-state \
  -f report_path=jobs/__dispatch-proof__/pr-1106-never-exists.md \
  -f report_url=https://github.com/openclaw/clawsweeper/pull/1106

Validation:

  • pnpm run build:all
  • pnpm run test:no-build
  • pnpm run lint
  • pnpm run format:check
  • pnpm run check:active-surface
  • pnpm run check:dashboard-queue-boundary
  • pnpm run check:limits
  • autoreview --mode local --max-priority P1 --prompt <scope> — clean, no accepted/actionable findings
  • autoreview --mode branch --base origin/main --max-priority P1 --prompt <scope> — clean, no accepted/actionable findings

Bay impact

None. This changes no dashboard code, dashboard data contract, queue/status telemetry, or observer surface, so OpenClaw Bay needs no update.

@steipete
steipete requested a review from a team as a code owner August 10, 2026 18:23
@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 2:54 PM ET / 18:54 UTC.

ClawSweeper review

What this changes

The PR deletes 12 unused workflow, repair, schema, command, and test surfaces while removing the stale workflow caller argument that would otherwise target a deleted input.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. The prior workflow-dispatch blocker is fixed on the current PR head, and the source audit plus real GitHub dispatch proof support this cleanup; no blocking patch defect was found.

Priority: P2
Reviewed head: 8b87b7f4e39ce8e7d7a1b1cf7a2ec13cddaea366

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The cleanup is well-scoped, resolves the earlier P1 dispatch defect, and includes credible production-boundary proof.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The PR records an after-fix GitHub Actions dispatch on the exact head that accepted the reduced input contract and failed safely before any repair or status mutation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR records an after-fix GitHub Actions dispatch on the exact head that accepted the reduced input contract and failed safely before any repair or status mutation.
Evidence reviewed 5 items Ignored workflow input: Current main declares the issue-intake model input but hard-codes the actual execution model, so the removed input does not affect runtime model selection.
Caller correction and regression guard: Current main’s viable-issue dispatch still supplies model; the PR removes that argument and adds a test that checks every sweep issue-intake dispatch for the deleted input.
Active replacements are present: The live runtime uses the all-repository spool reader, authenticated cluster-intake acceptance, target-history compaction, and batch-aware progress reporter; searches found the removed alternatives only in their definitions or associated tests.
Findings None None.
Security None None.

How this fits together

ClawSweeper’s GitHub workflows turn reviewed issues into repair jobs and publish review results through separate queue-backed automation. This PR removes unused internal seams while preserving the active issue-intake, repair, and publication paths.

flowchart LR
  A[Sweep candidates] --> B[Issue intake workflow]
  B --> C[Repair jobs]
  D[Review queue] --> E[Publication worker]
  E --> F[GitHub review state]
  G[Unused legacy surfaces] --> H[Removal in this PR]
Loading

Before merge

  • Resolve merge risk (P1) - An untracked manual workflow-dispatch caller that still supplies the ignored model input would be rejected after merge; repository callers are audited, guarded, and covered by the recorded live dispatch.
  • Complete next step (P2) - No separate repair work is needed; this PR already addresses the prior concrete workflow-dispatch defect.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Cleanup scope 25 files affected; 61 additions, 1,489 deletions The broad deletion spans workflows, repair internals, schemas, and focused regression coverage.

Merge-risk options

Maintainer options:

  1. Merge with the audited dispatch contract (recommended)
    Accept removal of the ignored internal input because all in-repository callers are accounted for, the sweep guard prevents regression, and the current-head dispatch was accepted by GitHub.

Technical review

Best possible solution:

Retain the single workflow-owned model configuration and merge with the caller guard so future sweep dispatches cannot reintroduce the removed input.

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

Not applicable: this is deletion-focused cleanup, and the relevant validation is that retained automation paths still accept their dispatches.

Is this the best way to solve the issue?

Yes. Removing ignored duplicate surfaces while retaining the live owners and adding a dispatch-caller guard is the narrowest maintainable solution.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 59904fe97f88.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR records an after-fix GitHub Actions dispatch on the exact head that accepted the reduced input contract and failed safely before any repair or status mutation.
  • 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. Sufficient (linked_artifact): The PR records an after-fix GitHub Actions dispatch on the exact head that accepted the reduced input contract and failed safely before any repair or status mutation.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This internal automation cleanup has limited direct user impact but changes a live workflow-dispatch contract.
  • merge-risk: 🚨 automation: Removing a workflow input can reject any retained caller that still sends it, so the caller audit and live dispatch proof matter.
  • 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. Sufficient (linked_artifact): The PR records an after-fix GitHub Actions dispatch on the exact head that accepted the reduced input contract and failed safely before any repair or status mutation.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR records an after-fix GitHub Actions dispatch on the exact head that accepted the reduced input contract and failed safely before any repair or status mutation.

Evidence

What I checked:

  • Ignored workflow input: Current main declares the issue-intake model input but hard-codes the actual execution model, so the removed input does not affect runtime model selection. (.github/workflows/repair-issue-implementation-intake.yml:251, 59904fe97f88)
  • Caller correction and regression guard: Current main’s viable-issue dispatch still supplies model; the PR removes that argument and adds a test that checks every sweep issue-intake dispatch for the deleted input. (.github/workflows/sweep.yml:4780, 8b87b7f4e39c)
  • Active replacements are present: The live runtime uses the all-repository spool reader, authenticated cluster-intake acceptance, target-history compaction, and batch-aware progress reporter; searches found the removed alternatives only in their definitions or associated tests. (src/action-ledger-runtime.ts:547, 59904fe97f88)
  • History and ownership: Blame ties the active replacement paths to the reviewed main-history work led by Peter Steinberger; recent queue work also includes Martin Cleary and Dwin Gharibi. (src/repair/cluster-intake-state.ts:335, 14bd27bc8fa1)
  • After-fix production-boundary proof: The PR body links GitHub Actions run 31420545428, accepted at 2026-08-10T18:43:50Z on the PR head, which accepted the reduced dispatch input contract and then failed intentionally before repair/status mutation on a nonexistent report path. (.github/workflows/repair-issue-implementation-intake.yml:8, 8b87b7f4e39c)

Likely related people:

  • steipete: Peter Steinberger introduced the current authenticated intake and publication replacement paths and authored this focused cleanup. (role: introduced and recently maintained the active repair-automation paths; confidence: high; commits: 14bd27bc8fa1, 8b87b7f4e39c; files: .github/workflows/repair-issue-implementation-intake.yml, src/repair/cluster-intake-state.ts, src/action-ledger.ts)
  • Martin Cleary: Recent main history shows Martin Cleary maintaining exact-review publication behavior adjacent to removed prototype code. (role: recent exact-review publication contributor; confidence: medium; commits: cd4892391195; files: src/repair/exact-review-batch-cli.ts, src/repair/exact-review-batch-publisher.ts)
  • Dwin Gharibi: Recent main history includes Dwin Gharibi’s repair-path correctness work near the retained automation surfaces. (role: recent adjacent repair-automation contributor; confidence: medium; commits: 7a9d33bed755; files: src/repair/target-validation.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 (1 earlier review cycle)
  • reviewed 2026-08-10T18:26:54.366Z sha f299478 :: needs real behavior proof before merge. :: [P1] Remove the retained model dispatch argument

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. 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 rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 10, 2026
@steipete
steipete merged commit e137917 into main Aug 10, 2026
23 of 24 checks passed
@steipete
steipete deleted the steipete/delete-dead-surface branch August 10, 2026 18:59
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: 🐚 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