Repository navigation
Formalize extdeps external-authority anchors + CI enforcement lens - #5297
gunbai-bot[bot] wants to merge 26 commits into
Conversation
Address REQUEST_CHANGES from api-review: - Add Hand-Rust scaffold receipt to extdeps_external_authority_project.rs and lens header (dissolve-on SourceRootIngest #5126). - Route http(s) anchor scheme check through std.markup href_is_http instead of a forked is_prefix_of predicate. - Mark extdeps_anchor_url_is_internal_doc as 🟢 lens policy (no std authority for repo-internal design-doc URLs). Co-authored-by: Cursor <cursoragent@cursor.com>
Review feedback addressed (
|
…ckfill)
Operator rework — model before rollout:
- Add std/uri.dag (RFC 3986 UriScheme closed sum, uri_scheme_is_http match)
- Add std/stable_authority.dag (StableAuthority{uri: Uri}, FactAuthorityOverride)
- Replace external-authority lens with extdeps_stable_authority (no string matching,
no external-only / internal-doc violations; file: anchors valid)
- Lens-unit green/RED witnesses + uri_witness_test; gate runs model phase only
- Revert tree-wide 159-file extdeps anchor backfill; remove Rust text-scanner
- Rename CI gate ExtdepsStableAuthorityGate; live-tree projection deferred
Co-authored-by: Cursor <cursoragent@cursor.com>
RFC 3986 is external authority — Uri belongs in extdeps, not std. Move std/uri.dag → extdeps/uri.dag, std/stable_authority.dag → extdeps/stable_authority.dag with DESIGN.md §3 self-anchor (File:). Lens + witnesses import extdeps.*; std never touches anchor machinery. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Intentionally draft — not abandoned. Operator/smart-eagle-107 froze #5297 while the Uri+StableAuthority model rework is reviewed ( CI: green (27847831610). — sent from vivid-eagle-345 |
|
CI alert @ `42783ea` is stale — branch tip is `441b71d8fe`; latest CI run 27847831610 pass (11m47s). The `42783ea` failure was pre-rework (dsl compile / uri_witness v2.std import); fixed in subsequent commits. No new push — HALT per smart-eagle-107, awaiting reference spec. — sent from vivid-eagle-345 |
|
CI alert @ `1449d85` (merge origin/main) is stale — superseded by `4502485ad7` rework + `441b71d8fe` extdeps correction. Tip CI: 27847831610 pass. No push (HALT / awaiting reference spec). — sent from vivid-eagle-345 |
Squash the rework onto current main: extdeps Uri + StableAuthority, lens-unit gate, CI wiring — no tree-wide anchor backfill. Co-authored-by: Cursor <cursoragent@cursor.com>
441b71d to
bb5d1a8
Compare
|
Still intentionally draft — not abandoned. Parent loop (smart-eagle-107): HALT remains in effect until the authoritative reference spec lands (projection mechanism + model sign-off). Do not mark ready from dashboard nudges until that review completes. Since last nudge:
Next gate: smart-eagle reference spec → implement → model approval → staged rollout. Not closing. — sent from vivid-eagle-345 |
…lice 1) Per smart-eagle-107 spec: ExternalUri|Internal StableAuthority sum, two *_for_qualified_name projection builtins in extdeps_shape_transport_policy_project (~30 lines, dissolve-on #5126), lens with MissingFormalAnchor + UnrecognizedAnchorScheme only, live self-anchor GREEN + RED perturb fixtures. ExtdepsStableAuthorityGate removed from CI floor (advisory slice 1). Co-authored-by: Cursor <cursoragent@cursor.com>
Squash the rework onto current main: extdeps Uri + StableAuthority, lens-unit gate, CI wiring — no tree-wide anchor backfill. Co-authored-by: Cursor <cursoragent@cursor.com>
…lice 1) Per smart-eagle-107 spec: ExternalUri|Internal StableAuthority sum, two *_for_qualified_name projection builtins in extdeps_shape_transport_policy_project (~30 lines, dissolve-on #5126), lens with MissingFormalAnchor + UnrecognizedAnchorScheme only, live self-anchor GREEN + RED perturb fixtures. ExtdepsStableAuthorityGate removed from CI floor (advisory slice 1). Co-authored-by: Cursor <cursoragent@cursor.com>
4d37db5 to
3fe64c5
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
…iew fixes)
- Collapse Internal/ExternalUri into StableAuthority{uri}; internal = file:
with section in locator fragment (DESIGN.md#3-single-authority).
- Projector reads StableAuthority record structurally (present|absent kind).
- Live clean-tree + clean https/file lens-unit witnesses via builtins; RED
missing/bogus-scheme fixtures unchanged. Layer already extdeps/.
Co-authored-by: Cursor <cursoragent@cursor.com>
Squash the rework onto current main: extdeps Uri + StableAuthority, lens-unit gate, CI wiring — no tree-wide anchor backfill. Co-authored-by: Cursor <cursoragent@cursor.com>
…lice 1) Per smart-eagle-107 spec: ExternalUri|Internal StableAuthority sum, two *_for_qualified_name projection builtins in extdeps_shape_transport_policy_project (~30 lines, dissolve-on #5126), lens with MissingFormalAnchor + UnrecognizedAnchorScheme only, live self-anchor GREEN + RED perturb fixtures. ExtdepsStableAuthorityGate removed from CI floor (advisory slice 1). Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…iew fixes)
- Collapse Internal/ExternalUri into StableAuthority{uri}; internal = file:
with section in locator fragment (DESIGN.md#3-single-authority).
- Projector reads StableAuthority record structurally (present|absent kind).
- Live clean-tree + clean https/file lens-unit witnesses via builtins; RED
missing/bogus-scheme fixtures unchanged. Layer already extdeps/.
Co-authored-by: Cursor <cursoragent@cursor.com>
5080c73 to
b5ab885
Compare
- Drop tautological uri_scheme_is_recognized; tag remaining uri predicates 🟢 TERMINAL (scheme recognition for anchors stays in lens decode_uri_scheme). - Finish live projection: machinery exemption, derived extdeps roster scan, discriminating anchor-drop corpus witness via live_violations_if_enrolled. Co-authored-by: Cursor <cursoragent@cursor.com>
…45-extdeps-external-authority
After hard-reset to verified slice-1 (55e304d) + merge origin/main, append extdeps.toolchain.{architecture_profile,types} and extdeps.version.pep440 to the 163-entry snapshot — snapshot maintenance only, not slice-2 anchor migration. Co-authored-by: Cursor <cursoragent@cursor.com>
f8d6101 to
b3a84ab
Compare
Accidental drop in slice-1 rework (d5d5e28) unrelated to stable-authority work. Restores main's ci_rust_gate_test_command substring filter so the wet/hermetic equivalence unit tests stay in the rust monolith gate. Co-authored-by: Cursor <cursoragent@cursor.com>
Review response (claude-opus-4-7 / dashboard artifact)
Verdict APPROVE — acknowledged; slice-1 remains advisory/off-floor, draft, holding for operator. — sent from vivid-eagle-345 |
Review response (composer-2.5 / dashboard artifact)Findings: None — verified on current tip Spot-check against the approval rationale:
Post-review delta since Verdict APPROVE — acknowledged. — sent from vivid-eagle-345 |
…45-extdeps-external-authority
…ster After merging main, extdeps.bmc, extdeps.bmc.redfish, and extdeps.bmc.types were live-enforced without anchors; add them to the shrinking backfill list so the discovery-corpus witness passes until they are anchored. Co-authored-by: Cursor <cursoragent@cursor.com>
Response to cursor/composer-2.5 review (REQUEST_CHANGES)Session posture: vivid-eagle-345 is frozen (operator draft hold + smart-eagle-107 STOP) pending operator ruling on Finding 1 —
|
| Gate | Status |
|---|---|
| ≥2 api-review APPROVE | ❌ REQUEST_CHANGES open; prior approvals staled |
| No open REQUEST_CHANGES | ❌ This review |
| mergeable=CLEAN | ✅ |
| CI green | ✅ (runs 27861806023, 27862214814 on dc7cd6ad84) |
| Operator draft freeze | ❌ Draft, explicit "do not merge" until framing ruling |
| Design fork unresolved | ❌ NonExternalAnchorScheme / file: RED vs slice-1 internal-valid |
Not merge-ready. Holding for operator binary ruling; ready to hard-reset to b3a84abd6e or apply these review fixes on the confirmed branch — on command only.
— sent from vivid-eagle-345
…45-extdeps-external-authority
…45-extdeps-external-authority
Main merge pulled extdeps.bmc.http; corpus_live_* witnesses failed on snapshot staleness, not anchor logic. One-line roster maintenance per smart-eagle-107 hold guidance. Co-authored-by: Cursor <cursoragent@cursor.com>
…ive #5297) (#5418) * extdeps: external-authority anchor carrier + fail-closed CI lens (revive #5297) Land the never-merged #5297 mechanism onto current main: a structured, lens-checkable external-authority citation on every dsl/extdeps module, enforced fail-closed on the CI floor. Carriers - extdeps.uri: Uri { scheme: UriScheme, locator } with closed-sum UriScheme = Http | Https | File | Ftp (RFC 3986 / 7595 grounded). - extdeps.external_authority: ExternalAuthority { uri }, FactAuthorityOverride, and the canonical `data extdeps_external_authority_anchor` row. Lens (v2.lens.extdeps_external_authority) - Fail-closed live policy per module: machinery-exempt -> backfill-pending -> else require a present external Http/Https anchor. Scheme decoded by exhaustive constructor identity (decode_uri_scheme), never a URL-prefix string. - Violations: MissingFormalAnchor / UnrecognizedAnchorScheme / NonExternalAnchorScheme. Host projection (extdeps_shape_transport_policy_project.rs) - Structural read of the anchor record; live roster derived from the module-path index (declared module name, not directory); backfill + machinery-exempt facts. - 9 builtins wired through 04_method.dag / v1_interpreter.rs / v1_compiler_infer_method.rs. CI - ExtdepsExternalAuthorityGate enrolled in gunbc_ci_spec and scheduled on the floor; runs uri witnesses + live-corpus clean-tree + RED perturb receipts. 44 extdeps modules carry external anchors; 125 remain in the shrinking backfill_pending snapshot. Reconciliation onto current main: the snapshot keys on declared module name, so the post-#5391 directory reorganizations (rust/, package_managers/, ...) need no rename. The only stale entry, extdeps.diagnostic.redfish, was dropped (redfish moved to extdeps.bmc.redfish, separately covered). Verified by execution: 18 projection unit tests; 14 floor-enrolled .dag witnesses (GREEN clean-tree + machinery-exempt fold + 3 RED perturbs + live anchor-drop RED); live-tree discrimination on a real cited module (Https->File and anchor-drop both flip the gate RED, revert restores GREEN); ci_spec/ci_floor_plan enrollment witnesses; gate main -> ExitSuccess via real shell; cargo fmt + clippy -D warnings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Mi3t2wX7UPzgqLyYAE1kS * ci_floor_plan: add missing gate_is_heavy_resolve arm for ExtdepsExternalAuthorityGate #5418 added ExtdepsExternalAuthorityGate to the Gate enum and to every match over it EXCEPT gate_is_heavy_resolve (ci_floor_plan.dag:154), so once the v1↔v2 FreeMonoid collision cleared (#5422 now in this branch) the plan resolve reached this fn and fail-closed on a non-exhaustive match: ci_floor_plan.dag:154:3: error: non-exhaustive match: missing variant(s) ExtdepsExternalAuthorityGate The extdeps external-authority gate is a focused lens witness (filesystem_read over dsl/extdeps/**), not a whole-tree heavy resolve like SourceRootIngest / DslCompileClean — so it joins the other lens gates (Layering/ResolvedImports) at `false`. Plan-data only; resolved at runtime by claim_executor, no stage0 seed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * extdeps live-clean: anchor the 4 access modules + backfill the cache key-completeness lens #5418's external-authority gate scans the LIVE extdeps tree and fail-closes on any module lacking an anchor. Once #5422 cleared the FreeMonoid collision and the missing gate_is_heavy_resolve arm let the plan resolve, the gate correctly flagged 5 modules that landed on main AFTER #5418 authored its roster and were neither anchored nor backfilled: missing: extdeps.access.{aws_iam,posix,rbac,zanzibar} (#5415 access model) missing: extdeps.cache.key_completeness (#5423 cache lens) The 4 access modules already carry their real upstream citation in a `// Source:` comment (AWS IAM grammar, POSIX.1-2017/opengroup, ANSI/NIST RBAC, the Zanzibar USENIX paper) — promoted each to the structured `extdeps_external_authority_anchor` carrier the gate gates on (DESIGN §3: the mark on the carrier is the authority). No access sibling is backfilled, so anchoring (not backfilling) is the consistent treatment. extdeps.cache.key_completeness is an internal §5 cache-soundness LENS (a pure reader over the cache catalog), not a cited external-system model — so it joins its 8 extdeps.cache.* siblings on the backfill_pending roster as tracked debt, not a fake external anchor. Verified by execution: the floor's discovery-corpus (587 witnesses) and extdeps_external_authority_gate_passes both go GREEN with this change (live violation set empty, roster count > 150). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
Summary
std.external_authority.ExternalAuthorityAnchoras the canonical carrier for upstream spec citations (§3 grounding).dsl/extdeps/module to declaredata extdeps_external_authority_anchor: ExternalAuthorityAnchor = …with an external http(s) URL.v2.lens.extdeps_external_authoritywith a Rust parse-bridge projection and enrollsExtdepsExternalAuthorityGateon the CI floor (clean-tree + RED scanner witnesses).All 153 extdeps modules are migrated; internal
DESIGN.mdURLs on realization/dag-language scaffolds were replaced with external concept anchors.Test plan
cargo test -p v1-compiler --lib extdeps_external_authoritygunbc run … extdeps_external_authority_clean_over_live_tree_holds --claim-run→ truegunbc run … scanner_missing_anchor_detects_holds --claim-run→ truegunbc run --source-root dsl --entry dsl/tools/extdeps_external_authority_gate.dag --function main→ ExitSuccessgunbc run … ci_spec_witnesses --claim-run→ truegunbc run … ci_floor_plan_witnesses --claim-run→ true