Skip to content

refactor(config): consolidate session and channel regression fixtures - #114459

Merged
steipete merged 1 commit into
mainfrom
codex/test-dedup-config-phase3
Aug 9, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-dedup-config-phase3

Conversation

@steipete

@steipete steipete commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Current configuration-owner tests still repeated the same external-catalog, delivery-route, maintenance-admission, and schema-owner fixtures. The SQLite-era suite also lacked direct coverage for exact scope identity, staged archive decoding, and compressed-cache invalidation after source deletion.

Why This Change Was Made

Rebuild only the still-current consolidation on main: keep helpers and named tables local to the configuration/runtime-config lane, preserve every current case and assertion, and add the three distinct owner-level regressions. The obsolete file-era parent-fork refactor is deliberately excluded after the SQLite ownership rewrite.

Production already implements the three covered behaviors. This is a test-correctness and maintenance repair, not a runtime behavior change.

User Impact

No shipped behavior changes. Maintainers retain all current configuration, session-maintenance, archive, delivery, and heartbeat coverage, gain three direct regression cases, and maintain 157 fewer lines of test code.

Evidence

  • Baseline owner suites: node scripts/run-vitest.mjs src/config/group-scope-tree.test.ts src/config/plugin-auto-enable.channels.test.ts src/config/sessions/archive-compression.test.ts src/config/sessions/delivery-info.test.ts src/config/sessions/store.pruning.test.ts src/config/validation.channel-metadata.test.ts — 6 files passed, 160 tests passed; wrapper passed in 6.23s.
  • Candidate exact head: the same command — 6 files passed, 163 tests passed; wrapper passed in 5.21s.
  • Explicit distinct-case audit: baseline 0/3; candidate 3/3.
  • node scripts/check-changed.mjs — passed on Blacksmith Testbox with core-test typecheck, formatting, 245-rule lint, dependency/boundary guards, and zero warnings or errors. Testbox lease tbx_01kzk3f981sk7w678ayc3tfvfy; Actions run.
  • Codex-backed autoreview: clean after one round; no accepted/actionable findings.
  • git diff --check — passed.
  • Scope: six current-owner test files, production +0/-0, tests +160/-317 (net -157).

ClawSweeper rank-up moves are addressed: the change was recreated against the current SQLite-backed owners, redundant old parent-fork fixture edits were discarded, and exact-head focused/Testbox evidence is linked above.

@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Jul 27, 2026
@steipete
steipete marked this pull request as ready for review July 27, 2026 08:52
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 27, 2026
@clawsweeper

clawsweeper Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 3, 2026, 2:29 AM ET / 06:29 UTC.

ClawSweeper review

What this changes

This PR replaces repeated configuration, session, channel, and validation test fixtures with shared helpers and parameterized cases, plus adds regression coverage for scope-key matching and compressed archive cache behavior.

Merge readiness

⛔ Blocked until real behavior proof is added - 4 items remain

Keep this PR open for human handling: it has the protected maintainer label, while current main has substantially rewritten all seven affected test-owner surfaces after the branch head and GitHub reports the branch as dirty. The fixture-consolidation idea may still be useful, but it needs a current-main rebase and a deliberate decision about which non-duplicative regression cases remain worth carrying forward.

Priority: P3
Reviewed head: 6c3e932b5ec7f0158ba9f46a945357ce714bf577
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The test-maintenance intent is coherent, but current-main conflicts and missing inspectable exact-head proof make the branch not merge-ready.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The PR body reports hosted validation but does not provide inspectable exact-head after-fix output or a linked redacted artifact; add a redacted terminal/log artifact after rebasing so reviewers can verify the current owner suite. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports hosted validation but does not provide inspectable exact-head after-fix output or a linked redacted artifact; add a redacted terminal/log artifact after rebasing so reviewers can verify the current owner suite. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current owner surfaces were rewritten after the branch head: Current main contains commit 1317838 after this branch head; its change introduces/rebuilds the affected group-scope, archive-compression, delivery, parent-fork, pruning, and validation test owners. A direct current-main comparison shows all seven PR test files differ from the branch.
Current session owner boundary: The current parent-fork entry point delegates to the SQLite-backed lifecycle owner, so the old file-backed fixture consolidation cannot be assumed to remain the canonical test shape.
Branch adds focused regression intent: The proposed head adds direct tests for exact-before-normalized scope selection and compressed archive decoding/cache cleanup; those are concrete cases to reassess against the replacement owners after rebasing.
Findings None None.
Security None None.

How this fits together

OpenClaw configuration tests exercise group-scope policy, plugin/channel configuration, and session-storage lifecycle behavior. They feed regression protection for the configuration runtime and its SQLite-backed session subsystem, rather than changing user-facing runtime behavior directly.

flowchart LR
  ConfigInputs[Configuration inputs] --> ScopePolicy[Group scope policy]
  ConfigInputs --> ChannelRules[Channel and plugin validation]
  SessionData[Session and archive state] --> SessionOwners[SQLite-backed session lifecycle]
  ScopePolicy --> RegressionTests[Configuration regression tests]
  ChannelRules --> RegressionTests
  SessionOwners --> RegressionTests
  RegressionTests --> CI[Validation and release confidence]
Loading

Decision needed

Question Recommendation
Should the branch be rebased into the new SQLite-backed test owners and retain only its still-distinct regressions, or should the old fixture-consolidation branch be retired as superseded by the current-main rewrite? Port the distinct regressions: Rebase onto current main and retain only cases that add coverage to the replacement test owners, with fresh exact-head proof.

Why: The post-head rewrite changes the owner boundaries and test structure across every touched file, so automation cannot safely decide whether the older consolidation remains a net simplification.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports hosted validation but does not provide inspectable exact-head after-fix output or a linked redacted artifact; add a redacted terminal/log artifact after rebasing so reviewers can verify the current owner suite. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - GitHub reports the branch as dirty; merging or mechanically rebasing the old fixture refactor could conflict with the current SQLite-session test architecture.
  • Resolve merge risk (P1) - The exact-head PR body still lacks inspectable after-fix behavior proof, so the reported hosted validation cannot be independently assessed from the supplied evidence.
Agent review details

Security

None.

PR surface

Tests -340. Total -340 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 7 245 585 -340
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 245 585 -340

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests +245/-585 (net -340) The branch is test-only and materially reduces fixture code, but the reduction must be re-evaluated against the post-head owner rewrite rather than merged mechanically.

Stored data model

Persistent data-model change detected: persistent cache schema: src/config/sessions/archive-compression.test.ts, serialized state: src/config/sessions/archive-compression.test.ts, serialized state: src/config/sessions/delivery-info.test.ts, serialized state: src/config/sessions/session-accessor.parent-fork.test.ts, serialized state: src/config/sessions/store.pruning.test.ts, unknown-data-model-change: src/config/sessions/delivery-info.test.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Rebuild this as a narrow current-main test-only update: preserve only regression cases that the rewritten owners do not already cover, use the canonical SQLite/session test seams, and attach redacted exact-head validation output after the rebase.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Rebuild this as a narrow current-main test-only update: preserve only regression cases that the rewritten owners do not already cover, use the canonical SQLite/session test seams, and attach redacted exact-head validation output after the rebase.

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

Not applicable: this PR is a test-suite refactor and regression-coverage proposal, not a report of a standalone user-visible failure. Source inspection does establish that its original test-owner structure no longer matches current main.

Is this the best way to solve the issue?

No, not unchanged: the original fixture consolidation targets pre-rewrite test owners, while current main has a newer SQLite-backed session architecture. The best path is a selective current-main port rather than applying the old branch wholesale.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is low-risk regression-suite maintenance with no claimed user-facing runtime change.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports hosted validation but does not provide inspectable exact-head after-fix output or a linked redacted artifact; add a redacted terminal/log artifact after rebasing so reviewers can verify the current owner suite. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current owner surfaces were rewritten after the branch head: Current main contains commit 1317838 after this branch head; its change introduces/rebuilds the affected group-scope, archive-compression, delivery, parent-fork, pruning, and validation test owners. A direct current-main comparison shows all seven PR test files differ from the branch. (src/config/sessions/session-accessor.entry-mutation.ts:65, 1317838ac425)
  • Current session owner boundary: The current parent-fork entry point delegates to the SQLite-backed lifecycle owner, so the old file-backed fixture consolidation cannot be assumed to remain the canonical test shape. (src/config/sessions/session-accessor.entry-mutation.ts:65, 1317838ac425)
  • Branch adds focused regression intent: The proposed head adds direct tests for exact-before-normalized scope selection and compressed archive decoding/cache cleanup; those are concrete cases to reassess against the replacement owners after rebasing. (src/config/group-scope-tree.test.ts:13, 6c3e932b5ec7)
  • Current implementations retain the underlying behavior: Current main still owns case-insensitive scope lookup and archive decode/materialization in dedicated production modules, but the present tests have been reorganized around the new owner boundaries. (src/config/group-scope-tree.ts:46, 1317838ac425)
  • Proof remains non-inspectable: The PR body reports hosted suites and checks but provides no inspectable exact-head terminal output, artifact, recording, or redacted runtime log. The prior completed ClawSweeper review made the same proof request, and the supplied current body does not add an artifact. (6c3e932b5ec7)
  • Live metadata could not be refreshed: A read-only GitHub CLI request could not reach api.github.com; the supplied GitHub context remains sufficient to establish the protected maintainer label and dirty merge state.

Likely related people:

  • Shakker: Current main attributes the rewritten session owner boundaries, archive implementation, and affected test suite to the post-branch consolidation commit. (role: recent area contributor; confidence: high; commits: 1317838ac425; files: src/config/sessions/session-accessor.entry-mutation.ts, src/config/sessions/archive-compression.ts, src/config/group-scope-tree.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Rebase or recreate the test changes against the current SQLite-backed owners and discard redundant old-fixture edits.
  • Attach redacted exact-head terminal output, logs, or a linked artifact showing the focused owner suite after the update.

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 (8 earlier review cycles)
  • reviewed 2026-07-27T08:56:46.565Z sha 6c3e932 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-31T19:20:58.531Z sha 6c3e932 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T07:49:19.472Z sha 6c3e932 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T07:58:57.250Z sha 6c3e932 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T12:50:46.935Z sha 6c3e932 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T13:30:32.042Z sha 6c3e932 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T17:41:53.023Z sha 6c3e932 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T23:01:58.801Z sha 6c3e932 :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 1, 2026
@steipete
steipete force-pushed the codex/test-dedup-config-phase3 branch from 6c3e932 to 6d32ea1 Compare August 9, 2026 11:21
@steipete

steipete commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@steipete
steipete merged commit 4cb33d4 into main Aug 9, 2026
104 checks passed
@steipete
steipete deleted the codex/test-dedup-config-phase3 branch August 9, 2026 11:35
@steipete

steipete commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant