Skip to content

Add reusable kernel conformance suite - #205

Merged
bigboateng merged 10 commits into
mainfrom
test/kernel-conformance-suite
Aug 12, 2026
Merged

Add reusable kernel conformance suite#205
bigboateng merged 10 commits into
mainfrom
test/kernel-conformance-suite

Conversation

@bigboateng

Copy link
Copy Markdown
Contributor

Summary

  • extract the non-software integer fixture into an exported kernel conformance package
  • verify objective, authority, freshness, recovery, replay, transaction, concurrency, and marked-state laws
  • enforce the kernel dependency boundary and document the alpha compatibility policy

Verification

  • cd boatstack && go test -race ./kernel/... -count=1 -v
  • python3 -m unittest discover -s .github/tests -p "test_*.py" -q
  • python3 .github/scripts/run_go_tests.py (215 tests)
  • cd boatstack && go vet ./... && go build ./...
  • release-note validation and git diff --check

Boundary conformance

The suite imports only the general kernel. It does not use software-delivery packages, Git, repositories, worktrees, filesystem layouts, or subprocesses. Production kernel semantics are unchanged.

@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions github-actions Bot left a comment

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.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.96

The new conformance suite can certify a program whose targeted transitions reach a marked state but whose normal untargeted control loop cycles indefinitely. This is a concrete test-oracle defect; model-level verification is not required to establish it and is not recommended before fixing this witness.

Comment thread boatstack/kernel/conformance/conformance.go Outdated

@github-actions github-actions Bot left a comment

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.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.97

The runtime implementation is unchanged, but the new reusable conformance API can certify concrete Store implementations that corrupt concurrent state or durable receipts. These deterministic negative fixtures should be added before merge. Model-level verification is not recommended; direct regression tests are sufficient.

Comment thread boatstack/kernel/conformance/conformance.go Outdated
Comment thread boatstack/kernel/conformance/conformance.go

@github-actions github-actions Bot left a comment

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.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.97

The production kernel is unchanged, but the new conformance suite weakens an existing exact objective-revision regression into an objective-identity test, allowing a core freshness defect to pass. No model-level verification is recommended before merge; a focused regression test is sufficient.

Comment thread boatstack/kernel/conformance/conformance.go Outdated

@github-actions github-actions Bot left a comment

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.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.91

The runtime is unchanged, but the new reusable conformance suite falsely rejects valid fixtures containing durable history. Model-level verification is not recommended before merge because the defect is confined to deterministic test accounting.

Comment thread boatstack/kernel/conformance/conformance.go Outdated

@github-actions github-actions Bot left a comment

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.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.91

The new conformance suite can certify a store that partially mutates durable control state on a failed commit, contradicting its atomic-commit claim. Model-level verification is not recommended before merge; a focused torn-commit regression test is sufficient.

Comment thread boatstack/kernel/conformance/conformance.go Outdated

@github-actions github-actions Bot left a comment

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.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.95

The production runtime is unchanged, but the newly advertised conformance verifier can certify false receipt/refusal/recovery behavior and can reject a valid broad-authority fixture. These are deterministic suite defects; model-level verification is not recommended before merge.

Comment thread boatstack/kernel/conformance/conformance.go
Comment thread boatstack/kernel/conformance/conformance.go Outdated
Comment thread boatstack/kernel/conformance/conformance.go Outdated
Comment thread boatstack/kernel/conformance/conformance.go Outdated
@bigboateng
bigboateng enabled auto-merge (squash) August 12, 2026 15:47

@github-actions github-actions Bot left a comment

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.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.96

The reusable suite can falsely certify invalid verification, non-CAS concurrency, and incomplete executable-program freshness. These are concrete oracle gaps in the primary feature. Model-level verification before merge is not recommended as a substitute; the demonstrable suite defects should be corrected first.

Comment thread boatstack/kernel/conformance/conformance.go
Comment thread boatstack/kernel/conformance/conformance.go Outdated
Comment thread boatstack/kernel/conformance/conformance.go Outdated

@github-actions github-actions Bot left a comment

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.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.95

The runtime itself is unchanged, but the newly introduced conformance verifier has two soundness gaps and an error-path deadlock. It can certify stores without commit-stage CAS and operators whose receipt effect facts are false, while asymmetric port failures can hang the suite. Model-level verification is not recommended before merge; these concrete verifier defects should be addressed with focused regression tests.

Comment thread boatstack/kernel/conformance/conformance.go
Comment thread boatstack/kernel/conformance/conformance.go
Comment thread boatstack/kernel/conformance/conformance.go
@bigboateng
bigboateng merged commit 799aae8 into main Aug 12, 2026
17 checks passed
@bigboateng
bigboateng deleted the test/kernel-conformance-suite branch August 12, 2026 16:33

@github-actions github-actions Bot left a comment

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.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.96

The new verifier has concrete soundness gaps around program identity and authority expiry, and the repository contract weakens an existing domain-isolation check. Model-level verification is not recommended before merge; these deterministic verifier defects should be corrected first.

Comment on lines +167 to +174
alternate, err := kernel.NewRuntime(fixture.Scenario.AlternateProgram, fixture.Domain, fixture.Operator, fixture.CapabilityClassifier, fixture.Store, fixture.Locker, fixture.Clock)
if err != nil {
t.Fatal(err)
}
before := fixture.Scenario.Snapshot()
_, err = alternate.Apply(context.Background(), kernel.ApplyRequest{ResolveRequest: request, Prescription: prescription})
after := fixture.Scenario.Snapshot()
if unchangedErr := refusedApplyMutationError(before, after, transition); err == nil || unchangedErr != nil {

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.

[P1] Program-fingerprint check never isolates prescription freshness

Invariant: conformance must prove that a prescription is bound to the exact executable program fingerprint. Minimal sequence: resolve under program A/state A → create runtime B while durable state remains A → apply the old prescription. Apply can refuse solely because state A does not match runtime B, even if prescription fingerprint validation is completely removed; this test accepts any error. Thus the new suite can certify a kernel that permits old prescriptions after state and runtime are migrated together. The observable impact is execution under changed program semantics. Add a regression that retargets durable state to B at the same revision, applies A's prescription through runtime B, and requires a stale error with zero effects or state mutation.

Confidence: 0.98

Comment on lines +213 to +216
authority := fixture.Scenario.Authority
authority.Receipts = append([]kernel.AuthorityReceipt(nil), authority.Receipts...)
authority.Receipts[0].IssuedAt = fixture.Clock.Now().Add(time.Second)
resolution, err := resolveWithoutMutation(context.Background(), runtime, fixture.Scenario, kernel.ResolveRequest{InstanceID: fixture.Scenario.InstanceID, Objective: &fixture.Scenario.Objective, Authority: authority, Requested: transition})

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.

[P1] Authority conformance omits expiration and apply-time expiry

Invariant: expired authority must be rejected before effects, including when it expires between resolution and apply. The only temporal negative case changes IssuedAt to the future. A kernel that rejects future receipts but accepts ExpiresAt <= now passes the suite; likewise, the fixture cannot resolve with a valid receipt, advance the clock beyond expiry, and prove Apply refuses the historical prescription. This makes the new authority verifier unsound for a concrete credential-expiry bypass. Add expired-at-resolve and resolve-then-expire-before-apply cases, asserting refusal/staleness and an unchanged snapshot.

Confidence: 0.95

Comment on lines +418 to +421
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)

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

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