Repository navigation
import contract (#2875): state the rule contract, edit 15 rules on its corollaries, re-bless - #2876
Merged
Merged
Conversation
…s corollaries, re-bless One hit is a statement or directive that binds an external unit -- a module, package, header, library, file, stage or base image -- into the current unit, in the language's own dependency form (docs/import_rule_contract.md; sheet row draft -> stated, 11/68). The two open-defect cells were two different things. dockerfile 4 vs 3 was c.dockerfile's `FROM scratch` -- the reserved empty base binds nothing (C4; class_start still opens the stage, #2856's dual); rule and capture exclude it, c re-blesses 1 -> 0. embedded_python 7 vs 3 is the classifier's own floor: the language's detection regex IS an import of a hardware module, so every file carries one by construction -- inherency, ledgered corpus-side, no rule can move it. The crucible measured nine more rules disagreeing with the sentence, fixed in the same layer: apex counted every `receiver.Member` reference (22 -> 0; `Type.forName(` is its one load form -- the #2671 guard retired, not scoped), scala's class swallowed newlines so eight import lines read as ONE match (16 -> 275), shell's `.` fired on any path argument (`find . -name`, 103 -> 41), livecode counted its own `module`/`end module` headers and not the LCB `use` import (83 -> 33), fortran counted `use` inside string prose and host-association IMPORT (309 -> 269), abap/m4 anchored (template-string `include`, `include/Makefile` as a path), agc_assembly counts a symbolic BANK/SETLOC operand only (bare/numeric are location directives; EBANK= is args' token: 104 -> 50), makefile's tab-initial `include` is a recipe (the #844 fix, applied to this rule at last). Widened to the forms the contract names: csharp's alias directive (95 -> 96), go's aliased single-line import, python/embedded_python loader calls (statement-position twin parity; 1 crucible hit -- Prism strips the docstring doctests upstream). javascript/typescript's lazy `[^;]*?\bfrom` scan is bounded (quadratic on a from-less payload, found by the contract module's detonation; no crucible change). Bless scope: 294 diffs, 0 topological, all import-family -- the per-file import count, the extracted-dependency lists, and the dependency-network keys that re-solve from them (shell's old capture turned comment prose into edges named `path`; livecode's 11 `module *.tests` headers resolved by stem to tokio's tests.rs, which loses 11 phantom dependents). Newly parsed/excluded: none. Tests: one cross-language module (test_import_contract_2875.py: 33 languages, COUNTS for one-statement-one-hit, the FROM/link duals, the capture/count agreement on named units, ReDoS over 19 payloads); the apex #2671 regression test, agc's numeric capture cases, livecode's `module` capture, scala's comment-collision sweep and shell's two "known limitation" pins rewritten to the contract. signal_contract_audit baseline 59 -> 58; audit_check clear. Corpus: keyword-rosetta rebless/gitgalaxy-2875-import (manifest, ledger, report regenerated: open-defect share 19 -> 17 of 2639, import 0 of 45). Closes #2875 Co-Authored-By: Claude Fable 5.1 <[email protected]>
This was referenced Sep 8, 2026
Contributor
…ass over the diff list had rewritten it as a Python literal) Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.
Roadmap Phase 3 (#2812), the
importfamily (#2875). Sheet rowdraft→stated(11/68).Contract: one hit is a statement or directive that binds an external unit — a module, package, header, library, file, stage or base image — into the current unit, in the language's own dependency form. Six corollaries in
docs/import_rule_contract.md: C1 re-exports and loader calls count; C2 the unit is the statement, not the edge (the graph's edges are_dependency_capture's); C3 a binding, not a reference or the file's own header; C4 a named unit (FROM scratch, numericBANKbind nothing); C5 statement/command position; C6 one owner with the stated duals kept (dockerfile FROM/class_start, html link/io, sqlite .read/.import per #2841).The two cells: dockerfile 4 → 3 (
FROM scratchexcluded from count and capture; c.dockerfile re-blesses 1 → 0). embedded_python stays 7: the language's detector is an import of a hardware module, so every file carries one — inherency, ledgered corpus-side (its ownintended-morphologyentry replaces batch4's cross-product claim).15 rules edited (crucible before → after): apex 22 → 0 (reference arm retired;
Type.forName(only), scala 16 → 275 (one statement per line — the old class spanned eight import lines as one match), shell 103 → 41 (command position), livecode 83 → 33 (ownmoduleheaders out, LCBusein), fortran 309 → 269, agc_assembly 104 → 50, abap 7 → 6, m4 2 → 0, dockerfile 113 → 103, csharp 95 → 96 (alias directive), go (aliased single-line form), makefile (tab-initial recipe, the #844 fix applied here at last), python 1541 → 1540 + embedded_python (statement position + loader calls, twin parity), javascript/typescript (bounded lazy scan — the detonation found the unbounded one quadratic; no crucible change).Bless scope (
bless_scope.py): 294 diffs, 0 topological, all import-family — per-file import counts, extracted-dependency lists, and the network keys that re-solve from them (shell's old capture turned comment prose into edges namedpath; livecode's 11module *.testsheaders resolved by stem to tokio'stests.rs). Newly parsed/excluded: none.Verification:
tests/extraction/languagesgreen;test_import_contract_2875.py(33 languages);signal_contract_audit --ci(baseline 59 → 58);audit_check.pyall clear;rosetta_audit.py46/46 against the corpus branch.Cross-repo: engine first; corpus PR squid-protocol/keyword-rosetta (rebless/gitgalaxy-2875-import) follows. Label
rosetta:rebless-owed.Closes #2875
🤖 Generated with Claude Code