Skip to content

refactor(state): call the audit writer directly - #180930

Closed
steipete wants to merge 1 commit into
mainfrom
dbasync/simpldb-audit
Closed

steipete wants to merge 1 commit into
mainfrom
dbasync/simpldb-audit

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

The private registerSqliteAuditRecordAsync helper only creates an audit writer and forwards a record to its register method. Its sole production caller also constructs a temporary record object solely for this wrapper.

User Impact

Behavior is unchanged. The change removes 19 net production lines (+6/-25), one net test line (+6/-7), one forwarding call, and the production caller's temporary record object. No SQL, worker request, schema, transaction, retention, SDK or authority-check change is made. No timing or CPU improvement is claimed.

Why This Change Was Made

Call the existing writer directly and delete the superseded wrapper and type import. Each call still constructs a fresh writer, captures the store before any await, and awaits registration. The writer remains the owner of value preparation, admission, retention and settlement. The migrated rollback fixture also creates a fresh writer for each invocation; none of its assertions change.

The production caller now captures context before evaluating UUID/time arguments rather than immediately afterward; those synchronous argument evaluations do not await or mutate store selection.

Evidence

  • Sole production caller and both test callers migrated; repository reference search finds no remaining wrapper references or SDK exposure.
  • Independent Codex review: scoped-clean, no actionable findings.
  • Changed-file format/type-aware lint and git diff --check pass. check:changed selected checks recorded; remaining broad static/type gates are delegated to exact-head CI.
  • Existing audit-store rollback/value-capture, system-agent audit persistence and retained-state cleanup suites: all 3 files / 21 tests passed on the final head.
  • Complete census of 2,933 open main-targeting PRs: no overlapping paths, so this patch introduces no additional merge conflicts.
  • Execution SQL and request shapes are unchanged; frozen SQL measurement is not applicable.

@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.

@steipete
steipete marked this pull request as ready for review October 22, 2026 19:27
@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Oct 22, 2026
@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:29:06.331270Z 3a5f83c 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.

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

Labels

commands Command implementations size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant