Skip to content

refactor(state): inline retired table name in compatibility owner - #180912

Closed
steipete wants to merge 2 commits into
mainfrom
dbasync/simpldb
Closed

steipete wants to merge 2 commits into
mainfrom
dbasync/simpldb

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #180928, which includes this change and its proof in the consolidated database-infrastructure batch.

What Problem This Solves

An internal schema module exports only the retired message_tool_run_outcomes table name to one compatibility-list consumer.

User Impact

Behavior is unchanged. This deletes one production module and two net production lines (+1/-3). No SQL text, statement count, worker request, transaction shape, migration, schema version, SDK surface, or authority check changes. No latency or CPU improvement is claimed.

Why This Change Was Made

Keep the retired table name in the compatibility list that consumes it and delete the forwarding module. The historical pinned-source inventory used by scripts/pr remains intact because it describes earlier revisions.

A second proposed deletion, the session-sharing schema facade, is deferred: it changes an open PR's existing content conflict to a modify/delete conflict. Keeping that facade avoids increasing integration work for a five-line saving.

Evidence

@clawsweeper

clawsweeper Bot commented Oct 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.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes two internal forwarding modules and updates their sole callers to consume the same values directly.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-verifiable; supplied validation is existing in-process test evidence rather than a shipped-entry-point demonstration.
Proof confidence 🦐 gold shrimp (3/6) The maintainer-authored refactor is outside the ordinary contributor proof gate; its body reports existing migration, schema-refresh, and historical-schema suites passing, and source inspection verifies unchanged values without executing target code.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-directed change follows the repository's single-owner and complete-cutover guidance while preserving all existing schema and compatibility values.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the maintainer-directed cleanup preserves schema behavior, removes redundant indirection, and introduces no actionable defect; it remains a draft.

Priority: P3
Reviewed head: e74bd927796638b0e67778e107f60eea2726cbc5

Before merge

None.

Findings

None.

Agent review details

How this fits together

Agent database admission and migration consume historical SQL fragments and compatibility allowances to validate existing SQLite databases.

flowchart LR
  A[Agent database admission] --> B[Schema helpers]
  B --> C[Schema history owner]
  B --> D[Compatibility allowances]
  C --> E[SQLite validation and migration]
  D --> E
Loading

Technical review

Best possible solution:

Use the existing schema-history owner directly and keep the retired table allowance local to its compatibility consumer.

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

There is no reported runtime bug to reproduce; source inspection confirms that both deleted modules only forward unchanged values.

Is this the best way to solve the issue?

This is the smallest complete cleanup: both callers move to existing owners, both obsolete modules disappear, and no additional machinery or tests are introduced.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Historical session-sharing schema imports keeps the original intent (fd15115: Centralize historical schema construction for generated admission catalogs while preserving strict schema checks.)
  • Retired message-tool outcome table allowance keeps the original intent (2f98eea: The original diagnostic feature used a named table; later removal of its durable writers deliberately retained historical storage and compatibility metadata.)
  • Migration-preflight semantics keeps the original intent (509a5f0: Reject missing stable tables and unsafe partial historical schemas before migration can mask data loss.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 509a5f0 adds src/state/openclaw-agent-db-schema-helpers.ts:127 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 509a5f037376; files: src/state/openclaw-agent-db-schema-helpers.ts)

PR surface

Source -7. Total -7 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 4 11 -7
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 4 11 -7

Labels

Label changes:

  • add P3: This is a small internal cleanup with unchanged user-visible behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a small internal cleanup with unchanged user-visible behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 22, 2026, 3:17 PM ET / 19:17 UTC.

@steipete steipete changed the title refactor(state): remove schema forwarding modules refactor(state): inline retired table name in compatibility owner Oct 22, 2026
@steipete
steipete marked this pull request as ready for review October 22, 2026 19:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T19:23:29.193113Z 47c62a0 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47c62a0afb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -1 +0,0 @@
export const MESSAGE_TOOL_RUN_OUTCOMES_TABLE = "message_tool_run_outcomes";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove the deleted file from the wrapper inventory

The wrapper inventory still lists this exact path at scripts/pr-lib/wrapper-components.txt:1903. Whenever scripts/pr verifies or materializes its source closure, its verify operation sees the missing component and rejects with Incomplete anchor components; wrapper test fixtures using copyPrWrapperSources likewise throw ENOENT. Remove the inventory entry as part of this deletion so linked-worktree PR commands and their test suites remain usable.

AGENTS.md reference: AGENTS.md:L50-L52

Useful? React with 👍 / 👎.

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

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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