Skip to content

fix(modulecontract): declare owner-aware scope enforcement - #851

Merged
antoinetoussaint-byte merged 2 commits into
mainfrom
fix/module-owner-aware
Oct 26, 2026
Merged

antoinetoussaint-byte merged 2 commits into
mainfrom
fix/module-owner-aware

Conversation

@antoinetoussaint-byte

@antoinetoussaint-byte antoinetoussaint-byte commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

A solution's module contract could not declare the owner-aware enforcement that authority requires before issuing a person capability: strict decoding rejected owner_aware. Add the explicit top-level boolean and preserve it through Parse, Load, Encode and Resolve. Omitted or false remains false; roles and installation-owned scopes never imply enforcement.

Classification: fix at the contract owner. Reuses the existing contract model, strict decoder, wire.ReadMapping, encoder, resolver and fixture mutation checks. No alternate contract or authority policy engine. The new named decoding rule refuses string coercions (yes, "true"), with tests for malformed values, nulls, duplicate/unknown keys and aliases. Adds accepted/refused conformance fixtures and updates the documentation.

Authority reference: main 67b85b14a942; composition field 7 becomes domain.Module.OwnerAware, and authority/issue.go refuses solutions without it. CLI companion: codefly-dev/cli#1167 will pin this branch head and deliver the declaration.

Validation: go vet ./... and go test -race ./contracts/module/... pass locally. Lint on changes (golangci-lint run --new-from-rev=590c2562 ./...) passes with 0 findings. Full-repository lint is not clean: its 1,298 uncapped diagnostics are identical at base and head (the default capped report shows 337); this existing Core-owned backlog is a follow-up, not introduced here. CI is green on 7c040767911929cc40bcead3f56e72d435441ea6: 8 passed, 2 skipped, including full coverage and race. The CLI companion passes its positive/negative regression against real authority issuance from the delivered document; suppressing only the outgoing owner-aware bit reproduces the named refusal. Not exercised locally: the entire Core race suite, Linux sandbox/Nix suites, or a deployed cluster.

Merge with a merge commit as coordinated, preserving the CLI-pinned head. Do not merge as part of this task.

Carry an explicit owner_aware boolean through parsing, encoding and resolution.
Reject coerced string values through the existing strict wire reader and cover
both accepted declarations and named refusals in the conformance kit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the conformance kit principal so downstream renderers can exercise the new accepted declaration through their standard composition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@antoinetoussaint-byte
antoinetoussaint-byte merged commit 89bf6c4 into main Oct 26, 2026
10 checks passed
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