Skip to content

Enforce durable state facet ownership - #200

Merged
bigboateng merged 2 commits into
mainfrom
feat/durable-state-facet-ownership
Aug 12, 2026
Merged

Enforce durable state facet ownership#200
bigboateng merged 2 commits into
mainfrom
feat/durable-state-facet-ownership

Conversation

@bigboateng

Copy link
Copy Markdown
Contributor

Summary

  • classify every durable state field as installation, program, control, or product state
  • define kernel-owned read and write policies for every transition class
  • reject native, repository-program, and recovery commits that change an unowned facet
  • bind changed facets into journals, receipts, events, and the public SDK

Control boundary

The kernel now checks:

ChangedFacets(before, after) ⊆ AllowedWriteFacets(transition)

Repository programs cannot grant themselves installation or program ownership. Recovery can replay only the facet set validated for the interrupted transition. New durable fields fail closed until they receive an explicit owner.

Verification

  • 30 Python repository contract tests
  • 204 complete sharded Go tests
  • go test -race ./...
  • go vet ./...
  • go build ./...
  • release-note validation
  • git diff --check

@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.98

The patch breaks compatibility with existing durable journals and can emit an inaccurate recovery fact. Model-level verification is recommended for recovery facet accuracy across every interruption point and reachability of recovery from previous-version pending states.

Comment thread boatstack/internal/kernel/protocol/journal.go
Comment thread boatstack/internal/effects/recovery.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.98

The facet enforcement is internally consistent for current-version transactions, but the durable protocol bump makes existing repositories' journals unreadable and can fail only after a new effect has occurred. Model-level verification is recommended before merge after fixing compatibility, specifically to check whether any new facet refusal can enter a recovery zero-progress cycle.

Comment thread boatstack/internal/kernel/protocol/journal.go
@bigboateng
bigboateng merged commit 81477a2 into main Aug 12, 2026
16 checks passed
@bigboateng
bigboateng deleted the feat/durable-state-facet-ownership branch August 12, 2026 07:24
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