Repository navigation
Native source enforcement for owned sets - #6300
Open
schickling-assistant wants to merge 1 commit into
Open
schickling-assistant wants to merge 1 commit into
schickling-assistant wants to merge 1 commit into
Conversation
schickling
force-pushed
the
schickling-assistant/2026-11-10-source-enforcement
branch
3 times, most recently
from
November 10, 2026 18:46
aadff94 to
9596680
Compare
Contributor
Author
schickling
force-pushed
the
schickling-assistant/2026-11-10-source-enforcement
branch
6 times, most recently
from
November 10, 2026 22:07
d3ca5c4 to
ebe481a
Compare
…erges, audit mode Owned-set revisions carry a source policy (enforce off|audit|enforce, publisher, namespaces, unmanaged-allow). One gate covers apply, create in a claimed namespace, stop, start, mission publish/retire, hold, suspend, resume and retire. --force --reason records source debt in the write's transaction; the set's next publication closes every debt and reverts forced holds, suspensions and mission declarations. Audit mode records would-be refusals.
schickling
force-pushed
the
schickling-assistant/2026-11-10-source-enforcement
branch
from
November 10, 2026 22:16
ebe481a to
3bdc2d1
Compare
Contributor
Author
|
Independent reviewer (Fix6300b.Review6300b): GO for exact head |
schickling-assistant
marked this pull request as ready for review
November 10, 2026 22:17
schickling-assistant
had a problem deploying
to
evidence-signing
November 10, 2026 22:17 — with
GitHub Actions
Failure
schickling-assistant
had a problem deploying
to
evidence-signing
November 10, 2026 22:17 — with
GitHub Actions
Failure
schickling-assistant
temporarily deployed
to
evidence-signing
November 10, 2026 22:17 — with
GitHub Actions
Inactive
schickling-assistant
temporarily deployed
to
evidence-signing
November 10, 2026 22:17 — with
GitHub Actions
Inactive
schickling-assistant
requested a deployment
to
evidence-signing
November 10, 2026 22:33 — with
GitHub Actions
In progress
schickling-assistant
had a problem deploying
to
evidence-signing
November 10, 2026 22:33 — with
GitHub Actions
Failure
This branch had an error being deployed
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.
One squashed commit on main. It builds on #6286 (owned-set full tree, merged as
10104dde).Scope (decided)
Revision.policy: Option<SourcePolicy>holds{enforce: off|audit|enforce, publisher, namespaces, unmanaged_allow}. It is carried inowned-set.revisedand fenced by--expect-set. A publication that omits the policy keeps the current one. CLI:--source-policy FILE.jsonor--enforce/--publisher/--namespace/--unmanaged-allow. Namespace globs may claim onlyagent/,schedule/,subscription/andmission/. An agent'sexec/ptytasks are members carried with their agent (Owned sets carry agent exec/pty tasks and resolve ST_REVISION tokens #6286).exec/RUN/…andpty/RUN/…are mission-run runtimes, so a glob on them is refused withinvalid-source-policy.owned_sets::gate) covers apply, create in a claimed namespace, stop, start, mission publish, mission retire, hold, suspend, resume, and retire. Refusals name the verb (ad hoc stop is refused …).--force --reasonrecordssource.debt.recordedin the same transaction as the write.ClaimCommitContext.then:Store::append_source_gated/source_follow_up. Their debt names the runtime request.missions retire --force --reasonwrites throughappend_source_forced_receipt_claim_tx, which skips only the plainset-managed-subjectadmission refusal, and records the debt in the same transaction.reverted,adoptedorclosed, andsource.debt.closedis written in the publication transaction. Inside that same transaction, a forced hold still in place is released and a forced suspension still in place is resumed, written as the publisher.source.audited. View the records withfractal source status --audit.features.source_enforcement=1, which is advertised in both feature maps. A publication from anyone outside the publisher list is refused withsource-publisher-refused.runtime-outside-mission), so the set is its only writer.set-managed-subjectis now a client-v0 error code (schema, templates, regenerated clients). The schema doc is regenerated, and the principal-transition digest test excludes the three newsource.*kinds.docs/st3/owned-sets.md§ Source enforcement. The large-value inventory review notes thesource_forcedadmission flag.Not enforced
These are not enforced: messages, asks and answers, work claim/complete, run cancel, mission run starts, self
restart-when-idle, and restart of another agent.startable-bygrants are not enforced either. Fractal has no native startable-by grant today, and this PR does not add one.Test evidence
Focused runs on dev5 (nice). Earlier runs used head content
2e4cf410b0, and the integrationowned_sets::suite was rerun at95966801ed. After the rebase onto main5bde948843, these were rerun:fractal-evidence --lib owned_sets_tests43/43 at3bdc2d11d1,fractal --test integration owned_sets::17/17 atebe481aeb3, andfractal-schema/fractal-missions/fractal-store --lib1868/1869 atd3ca5c41d5. The one failure,client_messages::single_send_selector_is_visible_immediately_after_commit, is a wall-clock commit budget that passes when run alone.fractal-schema --lib: 151 passedfractal-evidence --lib owned_sets_tests: 42 passedfractal-missions --lib: 324 passedfractal --test integration owned_sets::: 17 passed at 9596680fractal-store --lib retirements: the producer guard passedscripts/check-sqlite-large-values: passedFull nextest bursts: at 9596680 https://github.com/compoundingtech/fractal/actions/runs/42878569498; at 3bdc2d1 https://github.com/compoundingtech/fractal/actions/runs/42913064790. The
convergence::seed_*failures also occur on main5bde948843(https://github.com/compoundingtech/fractal/actions/runs/42907646046: seeds 13 and 179). The test-only sim fix is in #6264.Fixes since the last draft:
append_admitted_claim_tx→refuse_unmanaged), not by the gate. It now writes through the source-forced receipt writer.person/operatoron a signed store mints that person's root and device keys (2 claims), so the check now compares the member's own claims.runtime-outside-missionrefusal.Johannes pre-approved queueing high-risk fractal PRs from the factory-cleanup effort under the merge bar: exact-head independent reviewer GO, hosted CI via the merge queue, merge as schickling-assistant.
Companion: schickling/factory#743 now claims only the four accepted namespace kinds.
Review fix: a forced mission creation in a claimed
mission/*namespace that the source still omits is now retired through its retired definition. Before,stop "mission/…"failed to parse and every later publication of the set failed. Covered inforced_writes_record_debt_until_the_next_publication_closes_it.Known, non-blocking: an identical republication (same source sequence and bundle) is a noop and does not close open debt. The applier publishes for each new source.
Rebase onto main after #6286 merged: the conflicts were in the principal-digest test exclusions, the
source_enforcementfeature-map entry, the regeneratedappend_admitted_claim_txlarge-value flow fingerprint, and the claims-v18 corpus union.Second review round (exact-head GO at
3bdc2d11d1):owner_run, which only mission materialization sets) skip the namespace-create gate, because source does not route run starts. They still passrefuse_unmanaged, so a run cannot redeclare a set member. Test:a_claimed_namespace_still_admits_run_owned_declarations.--adoptis no longer needed.