Skip to content
44 changes: 41 additions & 3 deletions .github/tests/test_repository_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,10 @@ def test_public_tree_excludes_private_context_and_v1_operating_guidance(self) ->
def test_general_kernel_is_domain_neutral_and_owns_shared_control_laws(self) -> None:
kernel = REPO / "boatstack" / "kernel"
kernel_files = sorted(kernel.glob("*.go"))
source = "\n".join(path.read_text() for path in kernel_files)
production_files = [
path for path in kernel_files if not path.name.endswith("_test.go")
]
source = "\n".join(path.read_text() for path in production_files)
Comment on lines +418 to +421

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Domain-neutrality guard no longer scans kernel tests

Invariant: reusable general-kernel fixtures must remain domain-neutral. The patch excludes every *_test.go file from the vocabulary scan, while the remaining test-specific checks only reject Git command execution, testRepository, and softwaredelivery. Consequently, adding a compiling kernel test containing a pull-request-, branch-, coding-agent-, or publication-specific fixture now passes this repository contract, whereas the base check rejected it. This allows domain-specific evidence to masquerade as generic kernel coverage. A minimal regression is a temporary kernel test containing const fixtureDomain = "pull request" and an assertion that the contract rejects it; retain the domain-neutral scan for root kernel tests as well as production and conformance files.

Confidence: 0.96

for token in (
"git", "repository", "worktree", "branch", "pull request",
"coding agent", "publication",
Expand All @@ -424,13 +427,17 @@ def test_general_kernel_is_domain_neutral_and_owns_shared_control_laws(self) ->

boatstack_packages = "github.com/operatorstack/boatstack/boatstack/"
kernel_package = boatstack_packages + "kernel"
conformance_package = kernel_package + "/conformance"
kernel_metadata = go_source_metadata(kernel_files)
for path, metadata in zip(kernel_files, kernel_metadata, strict=True):
allowed = {kernel_package}
if path.name.endswith("_test.go"):
allowed.add(conformance_package)
invalid = [
import_path
for import_path in metadata["imports"]
if import_path.startswith(boatstack_packages)
and import_path != kernel_package
and import_path not in allowed
]
self.assertEqual([], invalid, f"kernel dependency direction: {path}")

Expand All @@ -453,6 +460,37 @@ def test_general_kernel_is_domain_neutral_and_owns_shared_control_laws(self) ->
f"kernel test fixture imports software delivery: {path}",
)

conformance_files = sorted((kernel / "conformance").glob("*.go"))
self.assertTrue(conformance_files)
conformance_source = "\n".join(path.read_text() for path in conformance_files)
for token in (
"git", "repository", "worktree", "pull request",
"softwaredelivery", "subprocess",
):
self.assertNotRegex(
conformance_source.lower(),
rf"\b{re.escape(token)}\b",
token,
)
for path, metadata in zip(
conformance_files,
go_source_metadata(conformance_files),
strict=True,
):
invalid = [
import_path
for import_path in metadata["imports"]
if import_path.startswith(boatstack_packages)
and import_path != kernel_package
]
invalid.extend(
import_path
for import_path in metadata["imports"]
if import_path in {"os", "os/exec", "path/filepath"}
)
self.assertEqual([], invalid, f"kernel conformance dependency: {path}")
self.assertIn("conformance.IntegerFixture().Run(t)", test_source)

runtime = (kernel / "runtime.go").read_text()
software_relation = (
REPO / "boatstack" / "internal" / "softwaredelivery" /
Expand Down Expand Up @@ -527,7 +565,7 @@ def test_kernel_runtime_has_no_production_consumer_yet(self) -> None:
path
for path in sorted((REPO / "boatstack").rglob("*.go"))
if not path.name.endswith("_test.go")
and path.parent != REPO / "boatstack" / "kernel"
and not path.is_relative_to(REPO / "boatstack" / "kernel")
]
consumers = [
str(path.relative_to(REPO))
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ language models, or coding-agent semantics.
> ABI, configuration schema, generated skills, and state format may change
> without a compatibility path. Audit it before using it on important work.

During alpha development, Boatstack does not preserve backward compatibility.
Breaking architecture changes update all in-tree consumers together instead of
adding compatibility shims. Existing local installations may need to be reset
or regenerated.

## Try it

Boatstack installs into an existing Git repository. The repository must have an
Expand Down Expand Up @@ -107,6 +112,7 @@ control graph. The complete list is generated from the registry in the
| **Transactions** | Prescriptions bind the exact control instance, state revision, program, objective binding, observation, transition, and authority. Apply rechecks that boundary before execution. |
| **Verification and receipts** | Fresh postcondition verification, atomic state-and-receipt commits, and immutable transition facts. |
| **Recovery** | A durable effect attempt precedes execution. Interrupted or uncertain outcomes enter explicit recovery instead of blindly repeating an effect. |
| **Conformance** | A reusable, domain-neutral suite verifies objective handling, authority, freshness, recovery, atomic commit, replay isolation, concurrency, and marked-state reachability against any explicitly mapped domain fixture. |

### Software delivery

Expand Down
9 changes: 9 additions & 0 deletions boatstack/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

Read this before opening a PR that touches anything under `boatstack/`.

## Alpha compatibility policy

Boatstack does not preserve backward compatibility during alpha development.
Change existing interfaces, state, configuration, and generated surfaces when
the current architecture requires it. Update every in-tree consumer in the same
delivery. Do not add compatibility shims, dual paths, or migrations unless a
task explicitly requires one. Local alpha installations may be reset or
regenerated after a breaking change.

## Every Boatstack PR REQUIRES a new release note

CI runs `.github/scripts/release_notes.py check-policy` in the
Expand Down
Loading