feat(seed): SeedResult outcome, capped preview, advisory, count cap (ADR-0048 P1.3c)
A dedicated SeedResult replaces the borrowed insert outcome (X5): - CommandOutcome::Seed + DslSeedSucceeded event + handle_dsl_seed_success render: the echo, "N row(s) seeded into T", a capped preview table (D18, first 20 rows; full count always reported), and a Hint-styled advisory naming enum-ish / un-derivable-CHECK columns filled with generic text (D12/D13, Phase-1 wording). - SeedResult carries requested vs produced, so a junction cap is now reported to the user, not only logged. - Count cap (D6): a seed over 10000 rows is refused with a friendly error. - Catalog keys ok.rows_seeded / seed.capped / seed.advisory_generic. 4 new tests (advisory flag, IN-check not flagged, preview cap, excess count). 2346 pass / 0 fail / 0 skip, clippy clean.
This commit is contained in:
@@ -550,7 +550,10 @@ pub const KEYS_AND_PLACEHOLDERS: &[(&str, &[&str])] = &[
|
||||
("ok.index_dropped_with_column", &["index"]),
|
||||
("ok.rows_deleted", &["count"]),
|
||||
("ok.rows_inserted", &["count"]),
|
||||
("ok.rows_seeded", &["count", "table"]),
|
||||
("ok.rows_updated", &["count"]),
|
||||
("seed.capped", &["requested"]),
|
||||
("seed.advisory_generic", &["columns"]),
|
||||
// ---- Client-side success notes (ADR-0017 §6, ADR-0018 §9) ----
|
||||
("client_side.auto_fill_add_serial", &["count"]),
|
||||
("client_side.auto_fill_add_shortid", &["count"]),
|
||||
|
||||
@@ -983,6 +983,13 @@ db:
|
||||
# template couldn't provide. Re-introduce a key here if a non-English
|
||||
# locale lands.)
|
||||
|
||||
# Seed-command notes (ADR-0048): the cap note when the unique-value
|
||||
# space is exhausted, and the advisory that flags columns filled with
|
||||
# generic text that look like fixed value sets.
|
||||
seed:
|
||||
capped: "(of {requested} requested — ran out of distinct value combinations)"
|
||||
advisory_generic: "{columns} filled with generic text — they look like fixed value sets."
|
||||
|
||||
ok:
|
||||
# ADR-0040: the generic `[ok] <verb> <subject>` summary line was
|
||||
# retired — a successful command's echo line now carries a ✓
|
||||
@@ -990,6 +997,7 @@ ok:
|
||||
# per-operation row-count footers below still convey real payload
|
||||
# and are unchanged.
|
||||
rows_inserted: " {count} row(s) inserted"
|
||||
rows_seeded: " {count} row(s) seeded into {table}"
|
||||
rows_updated: " {count} row(s) updated"
|
||||
rows_deleted: " {count} row(s) deleted"
|
||||
# Shown beneath a `drop column --cascade` summary, once per
|
||||
|
||||
Reference in New Issue
Block a user