Repository navigation
fix: load composition grants for local fixture roles - #4
Conversation
Reuse Codefly workspace documents and the existing fixture grant resolver so compositions own their module permissions. Refuse malformed grants atomically before listeners start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Live delivery evidence for 69d55c8. I ran it from obin-ai/module-document-store#583's playground, which now pins this commit (85f2e302, eaf9db1f, 3fc387a6). The CLI was built from codefly-dev/cli#1158 at e6b56962. The run was The run also showed that a composition which supplies no document boots unchanged. The new Not verified live: the browser/edge journey (an editor publishes, an admin freezes, a viewer is refused). It stops before the store starts, for reasons outside this PR:
🤖 Generated with Claude Code |
… adds the rest (review r49)
The embedded fixture granted robin, tracing, evaluation, records, documents and
directory kinds, stood in for the model and installed a solution. It now holds
organisations, people and roles in the authority's own vocabulary
(console.identity) and nothing else. What a composition's modules and
solutions need arrives through the versioned fixture-composition document
(schema codefly.dev/authority/fixture-composition/v1): grants on the fixture's
roles, installations and stand-in modules, each through the fixture's own path.
- B1: the authority module ships an empty default document
(modules/authority/configurations/local), which a composing workspace's own
replaces whole. doctor reports it provided by the composed module, and a
workspace composing the authority alone, with neither federation nor
fixture-composition, boots ("the composition adds nothing to the fixture").
- M1: wildcard kinds and actions are refused by name.
- M2: module grants, the wiki installations and the model stand-in leave the
fixture. The authority playground supplies grants for the modules it
composes. The test kit applies them as a composition does
(testkit/testdata/composition.yaml). The test asserting the fixture's
documents grant is gone; the composition tests use synthetic kinds only.
- m1: an empty or null document, a null section, an unversioned document and
kinds or actions outside the grammar (whitespace included) are refused.
- m2: the local authority refuses to start in a pod.
- m3: the document is versioned, and the README states its contract.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review r49: all findings addressed at
Checks: Not done:
🤖 Generated with Claude Code |
Local compositions can now grant existing fixture roles the permissions their modules serve. Previously only the developer role followed the delivered catalog; editor/admin grants had to be added to the authority fixture, leaking consumer vocabulary into this repository.
This is a fix in the local authority, using Codefly's existing public workspace configuration documents (
fixture-roles) and the existing Role/Scope schema, resource matcher compiler and person grant resolver. The delivered catalog has no editor/admin organisation-role-class mapping. The loader runs before listeners start, preserves existing grants, and atomically refuses unknown roles, generated roles, malformed matchers, unknown fields, empty actions, null/empty documents and trailing documents. No authority interface or generated file changes, and no document-store scopes are added here. The document-store playground supplies its own publish/freeze grants and will pin this revision in obin-ai/module-document-store#583.Validation: the complete local-authority
go test ./...suite passed, including in-process conformance. Focused tests exercise composition grants, resource narrowing, named method refusals, atomic rejection and Codefly file loader → SDK document delivery → startup hook. Independent platform review accepted reuse and ownership. Existing host-package grant-resolution parity remains an owner obligation; this adds no resolver and does not claim SaaS parity.Live qualification remains incomplete:
codefly run service authority/local --env local --headless --local-agents --naming-scope fixture-roles-checkin the consumer playground stops before service initialization withservice-secrets secret-store: name cannot be empty. A compatible CLI and the composed store run are still needed to verify editor publication, admin freeze and viewer refusals against the running store.🤖 Generated with Claude Code