Skip to content

docs: align SchemaBot integration contract with execution-mode verdicts - #18

Open
Kiran01bm wants to merge 1 commit into
mainfrom
kiran01bm/docs-lld-alignment
Open

docs: align SchemaBot integration contract with execution-mode verdicts#18
Kiran01bm wants to merge 1 commit into
mainfrom
kiran01bm/docs-lld-alignment

Conversation

@Kiran01bm

Copy link
Copy Markdown
Collaborator

Summary

Docs-only sweep aligning the public doc set with the latest internal low-level design. The one real drift was the SchemaBot integration contract: SchemaBot has since shipped per-statement execution-mode verdicts, a direct-execution policy, and engine-keyed consent copy, and docs/schemabot-integration.md — the designated single home for that contract — predated all of it.

What

  • docs/schemabot-integration.md:
    • Plan returns TableChange{…, ExecutionMode, ModeReason} and maps a pg-sprite refusal to engine.ExecutionModeBlocked at plan time (previously misplaced under Apply).
    • Apply must re-resolve the routing decision at execution time rather than trusting the stored plan-time verdict.
    • New "Execution-mode verdicts and direct execution" section: the empty/blocked/direct verdict vocabulary, the v1 decision that PostgreSQL targets do not get direct_execution (the native route holds ACCESS EXCLUSIVE and blocks reads, so MySQL's risk framing does not transfer), plan-time-advisory / apply-time-re-resolve as OC-4, fail-closed partition ordering, the transactional-DDL advantage (LK-4), and the split-outcome consent-copy wording.
    • Fixed a broken TOC anchor.
  • docs/low-level-design.md: the ALTER/DROP PRIMARY KEY refusal row regains its route decision — PK reshape goes through expand/contract; SchemaBot's small-table direct-execution answer is deliberately not adopted on PostgreSQL.

Why

The adapter contract shapes pg-sprite's verdict and plan surfaces long before the adapter exists; documenting the current upstream contract (verdict fields, TOCTOU discipline, ordering rules) keeps the seam accurate for both external users and the future integration. All upstream references were verified against block/schemabot main (pkg/engine/engine.go verdict vocabulary, docs/direct-execution.md § Engine compatibility).

References

The internal low-level design's SchemaBot section was rewritten around
schemabot's execution-mode verdicts, direct execution, and engine-keyed
consent copy; propagate that contract to the OSS integration doc (the
single home for it) and carry the PK-reshape route decision into the
refused-operations table. Links verified against block/schemabot main.
@Kiran01bm
Kiran01bm marked this pull request as ready for review August 7, 2026 03:44
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant