feat(triggers): show a materialized column in pic triggers ls --app (D1)
A materialized copy of an M5 group stateful template (cron/queue/email) now reads as `materialized = true` — inherited, read-only — distinct from a hand-authored trigger. Threads a derived `materialized` bool (= `materialized_from IS NOT NULL`) row → domain → API → CLI, mirroring the `sealed`/`shared` columns; `list_for_app` SELECTs `materialized_from`. No migration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -57,6 +57,7 @@ fn create_kv_and_show_in_ls() {
|
||||
"enabled",
|
||||
"dispatch",
|
||||
"retry_max",
|
||||
"materialized",
|
||||
"created_at"
|
||||
]
|
||||
);
|
||||
@@ -67,6 +68,11 @@ fn create_kv_and_show_in_ls() {
|
||||
.find(|c| c.get(1).copied() == Some("kv"))
|
||||
.unwrap_or_else(|| panic!("kv trigger missing from ls: {stdout}"));
|
||||
assert_eq!(row[2], script_id);
|
||||
// D1: a hand-authored trigger is not materialized.
|
||||
assert_eq!(
|
||||
row[6], "false",
|
||||
"an app-authored trigger shows materialized = false"
|
||||
);
|
||||
}
|
||||
|
||||
#[ignore = "needs DATABASE_URL pointing at a running Postgres"]
|
||||
|
||||
Reference in New Issue
Block a user