Skip to content

feat(semantics): enforce bounded producer ownership - #4461

Closed
songoow wants to merge 1 commit into
loopx-project:mainfrom
songoow:codex/semantic-vocabulary-m05-producers
Closed

songoow wants to merge 1 commit into
loopx-project:mainfrom
songoow:codex/semantic-vocabulary-m05-producers

Conversation

@songoow

@songoow songoow commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Refs #4447
Related: #4459

Summary

This PR implements the next executable stage of the semantic-vocabulary-convergence-v0 RFC: the M0.5 scope and bounded producer foundation. It makes the producer/consumer distinction operational without claiming whole-program data-flow completeness.

Implemented stage

  • adds explicit bounded-context scope declarations for multi-value forks;
  • keeps raw inventory fork counts visible while accounting declared semantic forks separately;
  • changes legacy should-run retirement measurement to standalone identifier tokens;
  • adds a canonical EffectiveAction enum owner for the finite decision-slot value domain while preserving the string wire field;
  • adds producer-site metadata and a bounded producer write scan;
  • rejects unregistered producer literals even when no consumer compares them;
  • validates producer symbols, compatibility-only metadata, and that discovered producer modules are declared;
  • keeps dynamic producer paths explicitly outside the proof boundary;
  • adds negative tests proving comparisons are not treated as writes and unknown writes fail closed;
  • regenerates the semantic inventory after adding the owner carrier;
  • keeps the English and Chinese RFC mirrors aligned with the M0.5a/M0.5b contract.

Staged RFC plan

  • M0.5: scope declarations, producer closedness/liveness, and identifier-based retirement evidence — this PR.
  • M1: replace decision-slot literals with the owner enum at producers and consumers, and split replay/frontier slots.
  • M2: publish route/disposition mappings and the decision table through generated cross-runtime bindings.
  • M3: retire legacy should-run fields one field per schema-reduction PR after reader proof.
  • M4: reduce Python/TypeScript twins with replacement-first migration evidence.

The later stages remain explicitly unproved until their runtime call sites and compatibility evidence are implemented.

Review and validation

Reviewed with the project-owned LoopX premerge flow, using PR #4459's exact-head/evidence pattern. The review found and fixed an assignment-regex bug that could classify == comparisons as writes; validation was rerun after the fix and after rebasing onto the latest upstream/main.

  • python3.11 -B examples/semantic-vocabulary-drift-smoke.py — passed
  • python3.11 -m pytest -q tests/architecture/test_semantic_inventory.py tests/architecture/test_semantic_vocabulary_drift.py — 24 passed
  • python3.11 -m ruff check ... — passed
  • git diff --check upstream/main...HEAD — passed
  • DCO trailer check for the PR range — passed
  • loopx canary premerge --from-git-diff --git-diff-base upstream/main --format json — 14 selected checks passed, 0 failures, 0 manual holds
  • loopx check public-boundary validation — passed

Signed-off-by: song <liusongstep@gmail.com>
@songoow

songoow commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #4480, as documented in its current description. #4480 carries the M0.5 scope/producer/retirement work with the follow-up fixes for exact producer attribution, liveness evidence and input domains; its refreshed head 0ee2831 includes main edcddc7 and passes all 72 semantic inventory/production/drift tests. Closing this earlier proposal avoids maintaining two competing implementations and repeatedly regenerating both snapshots. The branch and discussion are preserved; no source branch was deleted and no PR was merged.

@songoow songoow closed this Sep 16, 2026
@songoow
songoow deleted the codex/semantic-vocabulary-m05-producers branch September 16, 2026 05:54
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