Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Contributing

Boatstack is a generated content distribution. Propose changes to workflow semantics, templates, evidence rules, or generated presentation in [Intelligence Flow](https://github.com/operatorstack/intelligence-flow/tree/64b1891a9eccda6ede3df1b5350462d8179ef112/labs/12-product-engineering-loop).
Boatstack is a generated content distribution. Propose changes to workflow semantics, templates, evidence rules, or generated presentation in [Intelligence Flow](https://github.com/operatorstack/intelligence-flow/tree/01dec93295af21787a594de9479acc16e0f85bba/labs/12-product-engineering-loop).

The Boatstack repository receives product/runtime changes through a generated pull request. Review the PR's `UPSTREAM.json`, tests, adapter diff, and context-size change; do not hand-edit generated output on `main`. `.github/workflows` is the exception: it is Boatstack's executable control plane, excluded from scheduled projection and changed only through a separate manually reviewed Boatstack PR.

Expand Down
17 changes: 9 additions & 8 deletions UPSTREAM.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"files": {
".gitignore": "a7079e923a776f14f1bb3a6aa0a11a133a8e1dfb35af020f327623357b7e3957",
"CONTRIBUTING.md": "57661de7b9cc07e16e5142bb2615a8eb8a0621632876b0ec713a3795403862dc",
"CONTRIBUTING.md": "01ec94c6a5b13837bcfa11b05bb1a9be58bd643fb144c1d4f17e3b6287e88c92",
"README.md": "3ce3e95e511089b44e946a44b8d5f4f81d019ece5336db65b2cab1f9dc4d4dad",
"assets/boatstack-journey.svg": "e465befc50c8ce30f3e07e8fd97012931beeb053392c8fbf38ad645023b3cc63",
"assets/boatstack-mark.svg": "be1f984da1bfa69fa5d1f986d8343d21f7e20921b71db888c928b4d2e54b09b5",
Expand Down Expand Up @@ -133,7 +133,7 @@
"boatstack/planning.go": "d33b661f448d5c009454f012f16e3dd3daa6756d26b855c93d3066b1aaf923c8",
"boatstack/planning_test.go": "c105a9c78c342be06614bf54d0bc1b661b0f7af64d63b79e43bd1fcc2769edd5",
"boatstack/pr.go": "b6df3e000dd6d34ecb6575385e44b2f6ee84a8f35ad5696e299177a7cddd7629",
"boatstack/pr_test.go": "7f82954d94c1ceae848a581dda25e58af92251d78a5a94ed2d672bedf5a0349e",
"boatstack/pr_test.go": "2e7709e2f163489a29ea3e7eb4bc932cfe6829b30d168f1aea9e942acbc3b4e7",
"boatstack/provenance.go": "d44dcd5421306269326f1202ba1d52df8c252490550270ef9d022e8ec2b65210",
"boatstack/provision.go": "eb7333a73331b011adc93f59a2d97415d850c2e588f0e2bbb5116984e2ef927d",
"boatstack/provision_test.go": "214e9edb991a66d5bbb696a7c1b63876d2f799f2cab4e3f40785f4e8f1eac57b",
Expand All @@ -160,8 +160,8 @@
"boatstack/runtime_cache.go": "e026ffc1906f7e1e98b768bae63e6658164d2826c07169c9121ce0f23c73faf8",
"boatstack/runtime_cache_test.go": "b981467ddc9f0f562da6bff5de7a80a9fe5a433a0317541d1e48df268546ac85",
"boatstack/runtime_provenance_test.go": "1d52f1e6b0691cf4667729cc9b9f3c55c128f0aa3321f3a2843a9aa6fd0e73dc",
"boatstack/safety.go": "15ce84911ad4b24e054f4e56ba783613c74d21c2cb136d63585f43dd95a94dbf",
"boatstack/safety_test.go": "2741610de4b8a47d66b1a5f18a028ab63417826789636587745b4e71dd2d59c3",
"boatstack/safety.go": "3f02b6be7d0a209da5afb2d23a5e5f1cb1c2578f1c4b430cea1d5a30a96e06ad",
"boatstack/safety_test.go": "02260654d0b93ad48585c40391b310810876a6abcafc3d6c074f1f4e4e633f76",
"boatstack/safety_update_publisher_test.go": "ed3f8187036623694dfe7c395cdae00fdae14609bab6124d1fdfc6fe73fa2196",
"boatstack/skill_frontmatter.go": "73364df463ce828c2d005aab55f72bb92f7a34d99cf3f53d4e0cd5a4da9dbd0e",
"boatstack/skill_frontmatter_test.go": "a3ec52e7df357a72265c95dd66db15d9c0effc7e5f90f14ce69c27792ce394eb",
Expand All @@ -187,10 +187,10 @@
"docs/benchmark-corpus-audit.md": "f2d206fe8579a514f9da82b2c96c19b343ac004be67617e1bd34f0f8e0e5e6c6",
"docs/benchmark-submission-audit.md": "9518abdd17690729c6423f87cab20418ed47b0915b5faa44b9ef975e9e9c3b79",
"docs/configuration.md": "060775c73431f28bd16066bdf9e0f89034d2855c7ca0f5544f660d24b91211d0",
"docs/evidence-engineered-coding.md": "f2596fdb5e3628dc9cf19c3f29df177cd2fa63882c924e5c0253b8628c20a75b",
"docs/evidence-engineered-coding.md": "36de4b7c7f2bbff5e250a3613e36a7e756b350f4bf44cf9f55feb944df746b3b",
"docs/generated-files.md": "437791765b0a4015032ae21d1a6618563cad92b7402819e4f963bf5ae16284a3",
"docs/getting-started.md": "51c2823f21e35140d31e6d5083dc4b89fddd24721ac6acc474154a4da53ee9f8",
"docs/public-claims.json": "0bddadb9ba7bb813e383f32d1b3422002376f069deb0834db3e42c99d68a80ab",
"docs/public-claims.json": "05bce9b3fab43563ca89db5e69b685bb2ee75b510cc7cc4eabfcac7754035209",
"docs/public-surface.md": "713f7a050b5f339cf948299103ef3800417dccfecf2cc1a4166397ea6f978907",
"docs/research-and-design.md": "8d78678108f0a6c924e1ff9b32c0f81aae9d1f779e0082843b6f99ad993ae2b6",
"docs/safety.md": "7b9b5c515d36e683767ec8d3d9d6d119ac93650b2f629d351deadd4c600ed6a6",
Expand All @@ -204,7 +204,7 @@
"labs/diagram-json/compiled/evidence.md": "1ba1c989ade070a8ef9a508fbd788d100d7292f2dbacbb2bce895468019f619d",
"labs/diagram-json/compiled/tasks.json": "88f60851abf79d851e9fccc754ff3040034ae595306bc87d64784c19eb403e71",
"labs/diagram-json/compiled/test-matrix.json": "424657ff505768e50fa113801fd8363364a18269d5297480907a993d44063a39",
"labs/diagram-json/plan.lock.json": "7bee0e448274d00342794f023a021816650085554dff4d6ed1288f59f0b2ab6b",
"labs/diagram-json/plan.lock.json": "d537e3b15bfa7312f12892f2a1c59fd34078fec2dea37c28362785c3fd17d1c3",
"labs/diagram-json/plan.md": "3cc4f533b8d69386deff16b3a594a3ba09d4c0c3db636cccd8c4380084ce6a51",
"labs/diagram-json/questions.md": "74733b015002c8a6777c558e7e997fa48c94850b9bd39054fe9366c97ecf728d",
"labs/diagram-json/request.md": "0808fc41c36779c404f4a3a121167da6e76cac56df526e70f9ed6d3e0d4c02ed",
Expand Down Expand Up @@ -313,6 +313,7 @@
"release-notes/2026-07-26-detached-activation.md": "97cf968c3bd57d5f88bd91c04672dae3cedba88e460758323cffe44532d2ec2c",
"release-notes/2026-07-26-detached-context-and-guard.md": "ed58fc69752bd9b48403e3bdd8e3459fa84a663bc3caa1e8246be3abc3ac6d6c",
"release-notes/2026-07-26-detached-supervision.md": "e8062f5f39e5ad86e9104f20b7b6b1581a95215aff17acbe916e0715e2424b11",
"release-notes/2026-07-26-effect-based-destruction-guard.md": "0e88c879dae420f31cff56781547de5220ac4e1f9a80a3d66735b0d8b010a471",
"release-notes/2026-07-26-guard-etxtbsy-retry.md": "4238591804be62f8b9a76dd5cda18923af60ef67932d40d70cab0d815124bcaf",
"release-notes/2026-07-26-guard-hydrate-double-check.md": "83a5591aba6bf30c9f4008ba8d26bf1994ef3fd61145f46fcdd1678912b9990b",
"release-notes/2026-07-26-hidden-jflow-design-note.md": "f60ed9dbbfb46a172ac9d33dd758a3166f820007b1673029f29f0fbefa0e5c0a",
Expand All @@ -321,7 +322,7 @@
"generator": "operatorstack/intelligence-flow:boatstack-distribution",
"schema_version": 1,
"source": {
"commit": "64b1891a9eccda6ede3df1b5350462d8179ef112",
"commit": "01dec93295af21787a594de9479acc16e0f85bba",
"path": "labs/12-product-engineering-loop",
"repository": "operatorstack/intelligence-flow"
}
Expand Down
32 changes: 29 additions & 3 deletions boatstack/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,20 +440,46 @@ No migration is required; revert the feature commit to roll back.
func TestManagedPRBlocksCommittedIrreversibleCapability(t *testing.T) {
repo := prTestRepo(t)
activateManagedFeature(t, repo, "reviewer-ready")
path := filepath.Join(repo, "scripts", "recover.sql")
// A committed SCRIPT that runs a destructive reset is a live capability the
// deploy pipeline would execute — the managed PR must block it. (A declarative
// .sql migration is data and is intentionally allowed; see safety_test.go.)
path := filepath.Join(repo, "scripts", "recover.sh")
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(path, []byte("DROP SCHEMA public CASCADE;\n"), 0o644); err != nil {
if err := os.WriteFile(path, []byte("#!/usr/bin/env bash\nsupabase db reset --linked\n"), 0o644); err != nil {
t.Fatal(err)
}
runGit(t, repo, "add", "scripts/recover.sql")
runGit(t, repo, "add", "scripts/recover.sh")
runGit(t, repo, "commit", "-m", "add unsafe recovery")
if _, err := PreparePRContext(PRContextOptions{Repo: repo, Feature: "reviewer-ready"}); err == nil || !strings.Contains(err.Error(), "irreversible capability") {
t.Fatalf("managed PR did not block committed destructive code: %v", err)
}
}

// A managed delivery that commits a declarative migration must NOT be blocked as
// an irreversible capability — regenerating and committing schema SQL is the
// normal migration step, applied later by the controlled deploy pipeline. This is
// the positive counterpart that dissolves the migration-bearing-delivery deadlock.
func TestManagedPRAllowsDeclarativeMigration(t *testing.T) {
repo := prTestRepo(t)
activateManagedFeature(t, repo, "reviewer-ready")
path := filepath.Join(repo, "schema", "generated", "staging.sql")
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(path, []byte("DROP SCHEMA public CASCADE;\nCREATE SCHEMA public;\n"), 0o644); err != nil {
t.Fatal(err)
}
runGit(t, repo, "add", "schema/generated/staging.sql")
runGit(t, repo, "commit", "-m", "regenerate staging schema")
// PreparePRContext may fail for unrelated reasons in this fixture; the delivery
// deadlock only exists if it fails SPECIFICALLY on the migration capability.
if _, err := PreparePRContext(PRContextOptions{Repo: repo, Feature: "reviewer-ready"}); err != nil && strings.Contains(err.Error(), "irreversible capability") {
t.Fatalf("declarative migration wrongly blocked the managed delivery: %v", err)
}
}

func TestManagedPRRequiresCurrentApprovalLockAndGateEvidence(t *testing.T) {
repo := prTestRepo(t)
directory := activateManagedFeature(t, repo, "reviewer-ready")
Expand Down
Loading
Loading