Repository navigation
safety contract (#2869): stated sentence + corollaries, 15 rules edited, two open cells to zero, golden masters re-blessed - #2873
Merged
Conversation
…s corollaries, re-bless One hit is a site that handles or forestalls a runtime failure at the value level -- a guarded region's opener or its typed handler, a runtime assertion or validation call, a fallback or handled-absence form, an installed failure handler or watchdog, or a hardening instruction -- in a form an ordinary identifier, type annotation or constructor cannot match. The two open cells: embedded_python counted the safety_bypasses plant's bare except: as safety (typed-handler form now, twin-fixed in python); haskell counted a type-signature plant (Maybe/Either constructors, C1) and cleanup's finally (C3, ledger dual resolved). Sheet row stated (10/68), doc + 51 contract pins added, golden masters re-blessed (scope: safety + its formulas only, newly parsed/excluded none). Closes #2869 Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6GxeANZdsik3h7xNzophv
Contributor
squid-protocol
added a commit
to squid-protocol/keyword-rosetta
that referenced
this pull request
Sep 8, 2026
…level re-plants, ledger duals resolved (#101) * safety contract re-bless (gitgalaxy#2869): two cells to the median, six value-level re-plants, ledger verdicts embedded_python 4->2 (bare except: is safety_bypasses' alone), haskell 3->2 (type-signature plant re-planted as fromMaybe catch; finally is cleanup's). rust/go/scala/assembly/groovy/livecode plants were authored to removed tokens and re-planted at the value level, each screened so only safety moves. haskell-finally-dual-cleanup-safety resolved; safety-contract-2869 added. Report regenerated at full precision: open-defect share 19 -> 17 of 2639, safety row uniform at 2. Cross-repo: engine first (squid-protocol/gitgalaxy#2873). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6GxeANZdsik3h7xNzophv * orphan audit: scope batch4's safety token down (gitgalaxy#2869 left every safety cell in band) The CI orphan-token audit flags batch4-dual-keyword-overlaps/safety as newly orphaned -- correct, the contract removed the last safety-side dual (livecode throw) and every comparable safety cell is in band, so the token excuses nothing. Dropped from the entry's signal union with the why recorded; baseline regenerated (16 -> 15, also absorbing the resolved haskell-finally-dual-cleanup-safety/cleanup token). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6GxeANZdsik3h7xNzophv * docs: regenerate bias artifacts against engine main (gitgalaxy#2873) Full-precision regen post-merge of keyword-rosetta#100; 0 unexplained out-of-band cells; ledger_orphan_check/ledger_issue_check clean. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012zPD39y58Bfrr2Q45Z6djL --------- Co-authored-by: Claude Fable 5 <[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 (epic #2812): the
safetyrow goes draft → stated (10/68). One layer: rule regexes + their strict pins + the sheet + the doc.Closes #2869
The contract
docs/safety_rule_contract.md(corollaries C1–C6, the 46-row audit table, known limits, deferred menu #2870). Sheet row flipped ingitgalaxy/standards/signal_contracts.py;how_to_add_a_language.md's safety comment now contains the sentence;signal_contract_audit.py --cigreen with a smaller baseline (59 findings). Cross-language pins:tests/extraction/languages/test_safety_contract_2869.py(51 tests, incl. ReDoS detonations and the deliberate-dual pins).The two open cells (both
extraction, now 0)except:(the safety_bypasses plant) counted as safety.exceptnow counts only in its typed-handler form (except ValueError:); blanket forms stay bypasses' (C3). python's rule got the twin fix (the test has no stated contract: c and embedded_python count safety's planted assert, and perl's Test::More::ok( fires the rule twice #2852 twin-parity lesson) — python's own cell never showed it only because python's bypass plant usesAny/cast.probeSafety :: Maybe Int -> Either Int Int, counted via theMaybe/Eitherconstructors: thetypescript-type-keywords-count-as-safetyquestion, generalized as C1) and c.hs'sfinallywas cleanup's plant counting twice (haskell-finally-dual-cleanup-safety, resolved: cleanup ownsbracket|finally|onException, verified).Measured with no red cell, fixed in the same layer (15 rules edited)
cobol END-* block closers 2500 → 68 (DECLARATIVES/VALIDATE/CHECK stay, hyphen-guarded; ON ERROR/AT END stay branch's per #2822's disposition); shell quoted-expansion 2985 → 777 (
${VAR:-fallback}stays — it is the value-level fallback form); rust type/constructor tokens 3182 → 316 (keeps if-let/while-let/let-else, theunwrap_orfamily,None =>arms); luaerror(/type/iteration 4438 → 3660; scala 321 → 1 (Trycounts in call/block form only); python drops declaration-level tokens and baregetattr(reflection_metaprogramming's); go dropserrors.New(C2),sync.*(C3),context.Context(C1); java/groovy drop bareOptional,@Immutable,@Transactional; kotlin dropserror/sealed/Result/fold; livecode dropsthrow(C2 — panics_and_aborts keeps the raise, batch4's last safety-side dual retires); objective-c drops barenil/Nil/NSError(31 → 0, an honest zero) and assembly drops frame mechanics for the hardening instructions (54 → 0, same shape).Bless scope (golden masters re-blessed from crucible v1.2.0)
1429 diffs, 0 topological, newly parsed/excluded none. Leaf keys: Defensive Programming Constructs, Error & Exception Exposure, safety_score/avg_safety_score, verification/Testing Exposure (
_calc_verificationreads safety per-function — verified in source), and the high_risk×safety dampener trio (Mitigated Danger / High-Risk Weighted View / Contextual Mitigations) — exactly the signal and the formulas that read it.Gauntlet
Full suite green except the two known-baseline items (security_auditor ML deps;
test_committed_fidelity_table_is_fresh_against_the_corpus, stale on main since keyword-rosetta#74 — the epic's housekeeping item, not this layer). ruff/mypy/dead-key audits: no new findings.rosetta_auditvs the corpus branch: 46/46.Cross-repo
Corpus re-bless PR: squid-protocol/keyword-rosetta#101 — re-plants for the six plants authored to removed tokens (haskell value-level, rust fallback forms, go
recover()×2 keepingcontext.Contextfor encapsulation 4, assembly hardening instructions, scala require/assume, groovy assert, livecodecatch tError— a baretryline shifts livecode's lens block structure and creates a phantomapi_orphan_credit, found by one-file scans), the two manifest cell moves, and the ledger verdicts. Merge order: engine first.🤖 Generated with Claude Code
https://claude.ai/code/session_01Y6GxeANZdsik3h7xNzophv