Skip to content

feat!: make reference eligibility explicit per purpose and align the editor with validation - #1446

Merged
Brad-Edwards merged 28 commits into
devfrom
1339-explicit-target-eligibility
Oct 15, 2026
Merged

Brad-Edwards merged 28 commits into
devfrom
1339-explicit-target-eligibility

Conversation

@doublewhy

@doublewhy doublewhy commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Complete #1339's shared reference-purpose policy across authoring, composition, instantiation, editor navigation/completion and runtime compilation. Validated references retain the canonical identity their field selected, including imported declarations and authority/operating scopes.

Breaking authoring change: objective subjects, action/effect targets, shared state and authority scopes require explicit eligibility. Recognized nonreferenceable declarations cannot masquerade as opaque effect targets. Eligibility grants no participation, authority or visibility.

Requirement UIDs

Related Issues

Closes #1339

Includes the overlapping repair criteria from #1503, #1511, #1577, #1578 and #1579. All nine repair areas are documented on #1339, with an additional tooling security repair. None of the required repairs is moved to a follow-up.

Identity program context: #1338, #1340, #1341 and #220.

ADR Impact

Aligns with ADR-109 participant identity, ADR-076 canonical identities and safe boundaries, ADR-052 subtype ownership, ADR-053 composition/source provenance, and ADR-020 operating scope. Affiliations remain optional and convey no authority; objective ownership stays separate from participant assignment.

Changes

  • Require an explicit eligibility decision for every declaration kind, runtime family and nested child, including special registration. Operating scope retains its narrower resource domain.
  • Rewrite ACL from_net/to_net and detection source_artifact_ref through canonical import namespaces, including nested imports and colliding root names. Restore the excluded stage-matrix cases.
  • Detect locked-import cycles and enforce the configured chain budget. Every editor path refuses registry resolution through locked chains. Bound workspace trust/lock reads and return SDL diagnostics without input values or native exception prose.
  • Resolve runtime projections with each field's declaration section or purpose. Preserve mixed-control bounds, interactive access, delivery-item eligibility and autonomous-effect semantics. Keep authored refs for documented semantic-only scopes without claiming runtime permission enforcement.
  • Validate relationship suggestions through their subtype owners and existing semantic checks, including distinct endpoints, compute/carrier attributes, deployment tenancy and selected control policies. Handle numeric list cursors and incomplete documents safely.
  • Carry real local/nested/imported definition ranges, original and composed paths, module identity, namespace and digest through the declaration index. Anchor imported semantic diagnostics at their source. Keep provenance separate from semantic equality and portable authority.
  • Recognize effect targets against the complete declaration index before module-local declarations disappear, and recheck after instantiation. Preserve genuinely undeclared boundary tokens.
  • Split flagged validation/import helpers by responsibility, preserve lazy public-export bindings, group YAML location collectors, and isolate exception assertions. Correct all reported Sonar findings.
  • Patch verification tooling to virtualenv 21.7.13 and urllib3 2.8.0, covering all seven observed dependency advisories. Regenerate integrity hashes through the established lock tooling; retain the other 47 package resolutions. The product lock already selects patched urllib3.

Test Plan

  • All nine repair areas have targeted regressions, including the 99 cases in six additional test_issue_1339_* modules.
  • Targeted repair/YAML/registry checks passed (333 cases), editor/reference-policy checks passed (77), and the complete endpoint-editor module passed (158). Every offered candidate retains its validation oracle; the existing timeout is preserved.
  • Relevant runtime/scope integration checks passed (42 cases), relationship parity passed after the final annotation correction (21), and synchronized landing-page checks passed (7).
  • Changed-file lint, formatting, scoped repository policy, generated-schema parity and contract/requirement tracing passed.
  • Fresh source-bound formal/specification captures were collected, recorded and validated with zero failures. Historical captures, retention records and numbered releases remain intact.
  • Offline tooling lock verification passed; only the two affected package versions and artifact hashes changed.
  • Final-head CI passed at 3ee3e0ba11138c7df3a61104048df2a30d9d9c7c: full verification, all four coverage shards, integration, CPython 3.11–3.14 compatibility, fuzz, proof/contract checks and security. Bootstrap qualification and docs also passed. Sonar quality gate is OK with zero open issues and zero open hotspots.

Local source execution uses explicit relevant modules/cases in a credential-free sandbox with networking disabled. Repository-wide test, integration and fuzz suites run only in CI. Lock resolution uses the existing approved package index without executing builds.

Ground Control Checks

The existing PR branch includes real merges from dev; contributor history is preserved. Authorized manual fallback recovered the publisher/synchronizer deadlock and the oversized PR-context read. Publication remains a fast-forward on the original PR branch. Merge remains a maintainer decision.

Traceability

The issue repair checklist maps required behavior to the shared purpose policy, declaration index, composition/resolution boundaries, language helpers, subtype owners and compiler projections. Existing and added regressions cover the admitted kinds and purposes across authoring, composition, instantiation and compilation. The security addendum identifies every affected advisory and its patched lock version.

Checklist

  • Reuse the shared policy, canonical resolvers and semantic owners.
  • Preserve source-size/package boundaries and schema publication history.
  • Include required fixes, overlapping acceptance criteria and observed security repairs in this delivery.
  • Preserve research history and release-managed versions.
  • All 14 required checks are green for the final commit.

Documentation

Updated the normative reference catalog, objective/variation guidance, editor documentation and migration instructions for eligibility, explicit registration, namespace rewriting, effect recognition, completion constraints, declaration provenance and runtime projection.

@doublewhy
doublewhy force-pushed the 1339-explicit-target-eligibility branch 5 times, most recently from 8e32e4d to 4b8794a Compare October 9, 2026 15:12
@doublewhy
doublewhy marked this pull request as ready for review October 9, 2026 15:47
@doublewhy
doublewhy force-pushed the 1339-explicit-target-eligibility branch 3 times, most recently from a36ae06 to 94777b1 Compare October 9, 2026 20:14
@doublewhy
doublewhy force-pushed the 1339-explicit-target-eligibility branch from 94777b1 to 3da6039 Compare October 10, 2026 14:28
@doublewhy
doublewhy force-pushed the 1339-explicit-target-eligibility branch from 3da6039 to ab22b8f Compare October 13, 2026 03:21
@doublewhy doublewhy changed the title feat!: make reference eligibility explicit per purpose and align editor suggestions feat!: make reference eligibility explicit per purpose and align the editor with validation Oct 13, 2026
@doublewhy
doublewhy marked this pull request as draft October 13, 2026 03:21
@doublewhy
doublewhy force-pushed the 1339-explicit-target-eligibility branch from ab22b8f to 4ac06f1 Compare October 13, 2026 03:54
@doublewhy
doublewhy marked this pull request as ready for review October 13, 2026 04:34
@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Completed all nine required repairs documented on #1339, including the overlapping acceptance criteria in #1503, #1511 and #1577–#1579. Preserved contributor history and merged the latest dev. All 98 added repair regressions pass after synchronization; the 18 explicit participant-obligation cases and both refreshed source-bound evidence captures also pass. Changed-file lint, scoped policy, schema parity and contract tracing passed. The PR description now records concrete commands and outcomes. Required isolated CI for this published head remains the completion gate.

@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Corrected the failures from current-head CI: source metadata now preserves scenario/declaration equality and existing source collision checks; relationship candidates copy only their edited edge; the exhaustive endpoint assertions remain, with complete/incomplete/untyped behaviors in separate cases under the existing timeout. The domain-join test now rejects a workstation that validation does not recognize as a controller. All 99 dedicated repair regressions pass, as do targeted classification, materialization, editor and topology checks. Lint, scoped policy and refreshed source-bound evidence validation pass. Required CI must pass for this new head.

@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Addressed all 24 Sonar maintainability findings without waiving checks. The repair/YAML/registry tests passed (333), editor/reference policy tests passed (77), and the complete endpoint-editor module passed (158). Merged the latest dev credential/artifact-evidence fix cleanly; its relevant runtime and scope/effect tests passed (42). Recollected and recorded source-bound formal/specification evidence for the merged source; selected capture validation reports zero failures. Final-head CI is required before merge.

@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Updated the tooling lock from virtualenv 21.7.9 to 21.7.13 and urllib3 2.7.0 to 2.8.0, covering all seven open dependency alerts observed during publication. The product lock already selects patched urllib3. Only these two transitive packages changed; hashes were regenerated through uv, offline lock verification and scoped policy pass. Product source digest remains unchanged. Required final-head CI is rerunning.

@Brad-Edwards
Brad-Edwards merged commit 9ce3c3c into dev Oct 15, 2026
38 checks passed
@Brad-Edwards
Brad-Edwards deleted the 1339-explicit-target-eligibility branch October 15, 2026 04:16
@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Recommendation: do not merge as is.

The repository-bound review snapshot could not be retrieved.

  1. Ground Control cannot return the PR changed-file inventory: pr_review_files_unavailable / stdout maxBuffer length exceeded. A second attempt with max_files=1 and max_patch_bytes=4096 fails identically.

Required action:

  • Restore a complete repository-bound review snapshot (fix the inventory read/output bound, or reduce/split the PR), then rerun review and required-check verification.

Coverage and outstanding work: Issue criteria, premise, design, source diff, checks and mergeability are unverifiable because the context call fails before returning them.

Verification limits: This is a verification blocker, not a demonstrated code defect or close recommendation.

doublewhy added a commit that referenced this pull request Oct 25, 2026
Resolve the conflicts with the hardening that #1446 landed on dev:

- module_registry/models.py: keep dev's bounded workspace-configuration
  reader, YAML token and graph validation and value-free
  sdl.workspace-config.invalid errors; drop this branch's unbounded
  read_text and yaml.safe_load loaders.
- module_registry/resolution.py: keep dev's locked-import loop with its
  cycle check, composition-depth budget and value-free invalid-record
  error; drop this branch's unbounded loop and value-rendering record
  error. Keep the directory and unreadable local-import checks and the
  imported-unit removed-scoring check.
- composition/_expand.py: keep dev's admit_import_source and
  declaration-source tracking; keep typed import-list validation before
  the first import resolves. The imported-unit removed-scoring check moves
  into composition/_import_admission.py, where dev now loads the unit.
doublewhy added a commit that referenced this pull request Oct 25, 2026
…e-surface

Conflicts and their resolution:

- Research evidence (docs/research, tools/formal_semantic_validation,
  tools/check_specification_coverage.py and three evidence tests): take
  dev's side and drop this branch's numbered releases (specification
  coverage 69.0.0, formal validation 70.0.0), the shared index edits and
  the revision-pin edits. Feature branches record content-addressed
  captures instead (.gc/plan-rules.md, docs/develop/research-captures.md).
- participant_behavior_specification.py, validator/__init__.py,
  compiler/pipeline.py: keep dev's mixed-control policy, effect-target and
  delivery-control members beside the episode policy.
- specs/sdl/references.md: keep dev's delivery-control rows, then the nine
  episode-policy rows.
- Schemas and ledger: regenerated from schema_bundle() on the merged
  source; the five last_change entries are recorded against the new
  content. materialized-scenario-v1.json is 469,101 bytes, inside the
  512,000-byte budget, because dev's shared-subschema factoring (#1584)
  absorbs the policy's growth (#1556).

Semantic conflicts resolved in the same merge:

- dev's #1446 replaced the targetable flag with explicit reference
  purposes, so the reset-authority check and its compiled address resolve
  through ReferencePurpose.TARGETABLE, the purpose the references.md row
  already names, and the editor table gains the same entry.
- dev's composition/_behavior.py is now 490 lines, so the episode-policy
  rewriter moves to composition/_episode_policy.py to stay under the
  500-line cap.
Brad-Edwards added a commit that referenced this pull request Nov 12, 2026
Re-run the probes at c7d4999, after #1446 closed #1339 and the helpers
gained an optional document path. Record path mode (L5, L8, L13), remove
the two prerequisites that dev delivers, and update seams and counts.
Keep L11 and Y1 as observations of 3512210.
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.

2 participants