Skip to content

Re-land #30 substitution work on main - #32

Merged
Kiran01bm merged 6 commits into
mainfrom
kiran01bm/p3-4-mainline
Aug 13, 2026
Merged

Re-land #30 substitution work on main#32
Kiran01bm merged 6 commits into
mainfrom
kiran01bm/p3-4-mainline

Conversation

@Kiran01bm

Copy link
Copy Markdown
Collaborator

Summary

Re-lands the substitution work from #30 onto main. #30 was approved and merged, but its
base was the stacked branch kiran01bm/p3-2-native-idioms (already on main via #28), so
the merge stranded the commits off main. This PR carries the identical, already-reviewed
commits to main; no new changes.

What

  • Substitute safer native sequences by default in migrate, with the audited --force
    override (gated to substitution-override / rewrite-required / backend-unavailable paths).
  • Map execution failures to verdicts: new failed outcome carrying the stable executor
    code, failed step, and committed prefix in executed_sql.
  • CHANGELOG.md documenting the observable-outcome changes for automation callers.

Why

main must contain the substitution engine before dependent work (privilege preflight
composition in #31) can build on it. Content was reviewed and approved in #30.

References

Kiran01bm and others added 6 commits August 12, 2026 17:58
migrate now executes the planner's classified route: a blocking
submitted form runs as the safer native sequence (reported in the
verdict's executed_sql), --force requires typing the resolved
schema-qualified table and is audit-logged, and every typed executor
outcome carries a stable string code (executor.OutcomeCode) so
orchestrators branch on one vocabulary, not prose.
…ptNative

A forced submitted form was routed through RunSequence, whose shape
admission categorically refused it before any DB access — the documented
--force CREATE INDEX case could never execute. Forced runs now bypass
sequence admission and execute as one blind bounded attempt.

Executor admission refusals (unnamed index, IF NOT EXISTS, undriven
DETACH PARTITION CONCURRENTLY) now surface as typed refusal verdicts
instead of raw operational errors, invalid-index debris is never masked
as a plain budget refusal, refused forced attempts keep the
machine-readable forced flag, and the statement-budget advice is
tailored for submitted online idioms.
…to kiran01bm/p3-4-substitution

* origin/kiran01bm/p3-2-native-idioms:
  surface retry attempts and prove lock-retry flag wiring
  feat(executor): lock_timeout + bounded retry for native DDL

# Conflicts:
#	internal/cli/cli.go
#	internal/cli/migrate.go
#	internal/cli/migrate_test.go
…angelog

Review follow-ups on the substitution PR: a mid-sequence failure was only
a typed error on stderr, so automation could not distinguish nothing
committed from a scaffold left behind. Execution failures now end in a
third verdict outcome (failed, still exit 1) carrying executor.OutcomeCode,
the failed step, and the committed prefix. The changelog calls out the
intended outcome changes for automation callers.
cli: substitute safer sequences by default, gated --force, stable executor codes
…to kiran01bm/p3-4-mainline

* origin/kiran01bm/p3-2-native-idioms:
  Emit failed verdicts with executor codes and committed prefix; add changelog
  Map execution failures to refusal verdicts; run forced form via AttemptNative
  feat(cli): substitute safer sequences by default, gated --force
@Kiran01bm
Kiran01bm marked this pull request as ready for review August 13, 2026 10:50
@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.

@Kiran01bm
Kiran01bm merged commit 6990c5d into main Aug 13, 2026
13 checks passed
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