Repository navigation
fix(modulecontract): declare owner-aware scope enforcement - #851
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 throughParse,Load,EncodeandResolve. 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 becomesdomain.Module.OwnerAware, andauthority/issue.gorefuses solutions without it. CLI companion: codefly-dev/cli#1167 will pin this branch head and deliver the declaration.Validation:
go vet ./...andgo 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 on7c040767911929cc40bcead3f56e72d435441ea6: 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.