Skip to content

Enforcement rosters: ScopeRoster/SubjectRoster split, QualifiedName structural subjects + last dsl stragglers (E0 PR-0b) - #6256

Merged
briansrls merged 5 commits into
mainfrom
enforcement-roster-qualifiedname
Jul 5, 2026
Merged

briansrls merged 5 commits into
mainfrom
enforcement-roster-qualifiedname

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

What

PR-0b of the approved enforcement route (follows #6238): executes the fired subject_roster_string_dissolution_trigger, and un-conflates the carrier it lived on.

  1. The split — SubjectRoster carried filesystem scope roots and declaration names as one List<String>: two facts with different comparison semantics (path-literal vs segment-structural) in one representation. Now: ScopeRoster { roots: List<String> } (scope) and SubjectRoster { entries: List<QualifiedName> } (subjects, v2.std.qualified_name authority, structural ==). ScopeNarrowed.missing, claimed_scope, desired_scope → ScopeRoster; required_subjects/discovered_subjects → QualifiedName, grounded via qualified_name_from_dotted_string (required_subjects now grounds v1.compiler.infer.build_type_env as a real name, not a string).
  2. New RED control the old representation couldn't express — permuted_segment_subject_does_not_cover: same segments, different order must NOT satisfy the subjects leg. Plus a TypeItem-prefix control on self-application (kind filter proven; self_application_for now reads facts directly — a type sharing the lens's module prefix no longer counts as self-application, a small honesty gain).
  3. The last two dsl stragglers renamed (operator ask): phase_profile_proof_plan.dag dsl/tools→dag/tools and phase_profile_claim_executor.rs --source-root dsl→dag. The Rust consumer test had been failing on main since rename dsl -> dag #6165 (source root does not exist: dsl) — it now passes by execution; that one literal is the only .rs change.

Receipts (by execution, 2026-07-05, incl. after merging main + rebuilt binary)

  • 11/11 gate_test (incl. the new permuted control), 10/10 enforcement_live witnesses; enrolled pair 40s/39s — QualifiedName interning over 14,283 facts is in the noise.
  • Pinned 3-red/3-green verdict unchanged — representation-only, zero leg flips, exactly as the plan's discriminating-control rationale required.
  • phase_profile_claim_executor: 1 passed (spawns claim_executor over the repointed plan — both stragglers proven by one execution).
  • Typechecker note for reviewers: QualifiedName alias vs FreeMonoid<Symbol> fails to unify in an if-branch join (nominal field expectation flows into fold init while the then-branch expands structurally; De-fork grounding keystone: fix v2 generic type-alias instantiation so FreeMonoid aliases resolve - brief in docs plans dsl-v2-defork-audit section 3b #5552 alias-residue family) — worked around by hoisting the fold out of the record construction; assignment-position coercion works. Noted in the commit for the de-fork lane.

CI note: the ci check will show the known dark-CI cancel in batch-1 (compile-clean wall), as on every recent main run; the receipts above are the executable evidence.

🤖 Generated with Claude Code

briansrls and others added 4 commits July 5, 2026 02:52
…r (QualifiedName, structural ==) + last dsl stragglers (E0 / PR-0b)

The fired subject_roster_string_dissolution_trigger (vocab.dag), executed:
SubjectRoster carried BOTH filesystem scope roots and declaration names as one
List<String> - a state-space conflation with two different comparison
semantics (path-literal vs segment-structural) in one representation.

- vocab.dag: SubjectRoster.entries -> List<QualifiedName> (v2.std.qualified_name
  authority; compared via structural ==, qualified_name_eq); new ScopeRoster
  { roots: List<String> } for tree roots; ScopeNarrowed.missing -> ScopeRoster;
  scope_roster_covers/subject_roster_covers now two fns with the right
  semantics each; trigger row deleted, split note left on the carrier.
- standing_intent: desired_scope -> ScopeRoster; required_subjects grounds
  v1.compiler.infer.build_type_env via qualified_name_from_dotted_string.
- contract/receipts/gate/enforcement_live: claimed_scope -> ScopeRoster;
  discovered_fn_subjects converts at the decl_facts boundary (subject_qn_of,
  same single pass, linear); self_application_for now reads facts directly
  (String prefix pre-conversion, fn-like only - TypeItem no longer counts
  toward self-application, a small honesty gain).
- NEW RED control: permuted_segment_subject_does_not_cover - a QualifiedName
  with the same segments in a different order must NOT satisfy the subjects
  leg (the discriminator List<String> equality could not express).
- self_application_liveness_discriminates gains a TypeItem-prefix control
  (kind filter proven, not just prefix).
- dsl stragglers renamed (operator ask): phase_profile_proof_plan.dag
  dsl/tools -> dag/tools AND phase_profile_claim_executor.rs --source-root
  dsl -> dag. The Rust consumer test was failing on main since #6165
  (source root does not exist: dsl); it now PASSES by execution - the only
  .rs change is that one literal.

Receipts by execution (2026-07-05): 11/11 gate_test (incl. new permuted
control), 10/10 enforcement_live witnesses; enrolled pair 40s/39s (QualifiedName
interning over 14,283 facts is in the noise); pinned 3-red/3-green verdict
unchanged (representation-only, zero leg flips - as planned);
phase_profile_claim_executor 1 passed.

Typechecker note: QualifiedName alias vs FreeMonoid<Symbol> does not unify in
an if-branch JOIN (nominal expectation flows from a record-field into fold
init while the then-branch expands structurally) - worked around by hoisting
the fold out of the record construction; assignment-position coercion is fine.
Same #5552 alias-instantiation residue family.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gunbai-bot gunbai-bot Bot changed the title complexity lens enforcement Enforcement rosters: ScopeRoster/SubjectRoster split, QualifiedName structural subjects + last dsl stragglers (E0 PR-0b) Jul 5, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 5, 2026 03:10
@briansrls
briansrls merged commit d1f9d10 into main Jul 5, 2026
1 of 2 checks passed
@briansrls
briansrls deleted the enforcement-roster-qualifiedname branch July 5, 2026 03:57
briansrls pushed a commit that referenced this pull request Jul 5, 2026
@gunbai-bot gunbai-bot Bot mentioned this pull request Jul 5, 2026
6 tasks
briansrls added a commit that referenced this pull request Jul 5, 2026
Pick up main floor/CI fixes while keeping P3+P5 review fixes; restores
emit optimizations from prior merge path for floor budget.
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