Repository navigation
doc: typo - #140
Closed
domenkozar wants to merge 1 commit into
Closed
doc: typo#140domenkozar wants to merge 1 commit into
domenkozar wants to merge 1 commit into
Conversation
Member
|
Why don't you commit such changes directly? :-) |
Member
Author
|
I don't have push access |
Member
|
Ah, I see... and neither do I :-) |
Member
|
Applied! |
ConnorBaker
pushed a commit
to ConnorBaker/nix
that referenced
this pull request
Jul 25, 2025
…087c9ef-5c71-4e74-ab80-c4344c05847c Release v3.8.0
ConnorBaker
added a commit
to ConnorBaker/nix
that referenced
this pull request
May 22, 2026
Two adversarial-review and two pattern-discovery passes (Opus 4.7, 1M ctx, ~5,300 lines under doc/inventory/review/) walked the existing 217-entry catalog and found cross-shard patterns the per-shard catalogers couldn't see. This commit folds the four reports into the catalog. Catalog scope rewrite. The README's "Performance work without duplication or complexity to fix" exclusion was wrong: hot-path container choices, allocations in inner loops, cache-line alignment costs, and missed concurrency are all in scope on their own merits. Same for modernisation: shrinking the Boost dependency surface or migrating hand-rolled idioms to stdlib equivalents is a real simplification, even when no underlying duplication backs the change. The README "What this catalog targets" section adds an explicit "Performance" bullet and rewrites the modernisation bullet to be in scope; the anti-list now excludes only cosmetic changes and feature additions. Verdict-table corrections. NixOS#50 (resolved-by-design) and NixOS#148 (INVALID, windowSize destruction-order hazard) had verdict-table rows that contradicted their validation paragraphs; tables now match. NixOS#171 upgraded VALID per the scope rewrite. Section-17 header updated from "Five VALID; nine PARTIALLY VALID" to "Six VALID; eight PARTIALLY VALID" to track. Reclassifications and corrections from the deeper passes: - NixOS#140 reframed as dead code (zero callers anywhere; not a SIOF hazard as the original framing suggested). - NixOS#149 mechanism corrected: the `created = 123;` debug field is a guard against gcc bug 80431 miscompilation, not a use-after-free sentinel as pass-1 had stated. - NixOS#170 corrected to three Goal subclasses + Waker (not four Goal subclasses as the catalog body had said). - NixOS#147 demoted to PARTIALLY VALID; the singleton-leak path is load-bearing for legacy callers and must be retained alongside any per-Store ownership migration. - NixOS#122 expanded with two ABI hazards the prior reviewer missed: layout drift in `PrimOp::impl` (allocated by `nix_alloc_primop` C-API) and symbol-mangle break in `extern fun<...> stackOverflowHandler`. - NixOS#138 expanded: two C-API readers of `settings.readOnlyMode`, not one as pass-1 had stated. - NixOS#160 expanded with HALO-incompatibility hazard for any `boost::asio::awaitable<T>` migration that touches `final_awaiter`. - NixOS#129 expanded with destructor-throw caveat for the `MaintainCount` -> `Finally` replacement. - NixOS#143 expanded with TLS-fallback shutdown-ordering hazard. - NixOS#56 reframed as a real ODR fix: different TUs previously saw different definitions of the explicit specialisation; the values coincidentally matched so behaviour was preserved but the program was technically ill-formed. Count corrections (each verified independently via grep): NixOS#137 register sites = 16 (15 production + 1 test), NixOS#166 forward-decl headers = 9/21/12 (Store +2 over the catalog body), NixOS#167 buffer-size literals = 10 in libutil / 19 tree-wide, NixOS#169 friend declarations = 16 (one duplicate `ExprVar`), NixOS#172 `unreachable()` sites = 64-65, NixOS#173 pragma sites = 10, NixOS#176 daemon cases = 37 (35 distinct bodies), NixOS#178 trust-check sites = 11+1, NixOS#146 env vars = 14 in src/. Forty-four cross-shard candidates (N1-N44) folded into four new section files (22-25). The N-numbered range is intentionally separate from 1-217 to keep cross-references stable. Pattern clusters A-G, architectural debt themes A1-A7, C++23/Boost uplift series U1-U10 (with U7 split per pass-2's refinement), and ten redundant-abstraction pairs R1-R10 are documented in new README subsections. Eight follow-up agents (E1-E8) deferred for source-level investigation: verify `impureOutputHash` deletion path, audit C-API `*Settings` surface lockstep, write a Goal::Co property test pinning O(1) frame depth, build a daemon-client error-message preservation matrix, set up periodic branch verification, validate test-support consolidation, audit forward-decl source-compat, and choose the `vTrue`/`vFalse`/`vNull`/`vEmptyList` invariant. The four review reports plus the consolidation log live under doc/inventory/review/ and stay in-tree for traceability. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
ConnorBaker
added a commit
to ConnorBaker/nix
that referenced
this pull request
May 22, 2026
Folds the findings from E1-E8, F1-F3, B1-B3, C1, and V1-V5 into the candidate sections as in-place body edits. Each affected candidate now carries a See also: line pointing at the verifying report(s); counts are re-derived where the V-pass produced a verified number; mechanism corrections from source-level investigations replace inherited framing. Substantive corrections to existing candidates: - NixOS#134 / NixOS#135 / NixOS#138 (15-globals-settings.md): - B1 found that the catalog's "NixOS#136 keystone for NixOS#134/NixOS#135/NixOS#137/ NixOS#144/NixOS#149" chain is wrong about NixOS#135. The body's keystone block now lists only NixOS#134/NixOS#137/NixOS#144/NixOS#149 as NixOS#136-blocked; NixOS#135 is independent. The reasoning is preserved in NixOS#134's and NixOS#135's bodies (asymmetry between virtual-base diamond and inline-member flattening). - V1 found that 5 of 6 C-API libraries install_headers with their *_internal.h(h) files, exposing layout to C++ consumers. The NixOS#138 body now spells out the C++ ABI caveat for deleting the dead nix::ref<bool> readOnlyMode field, with a release-note requirement. - F1+V3 confirmed (via end-to-end source trace) a latent UAF in the _new-without-_load path: the heap bool is destroyed by nix_eval_state_builder_free while the resulting EvalState still holds a bool * to it. NixOS#138's body now folds the UAF repair into the readOnlyMode -> Store migration, so deleting the dangling field sweeps the bug away in the same change. - NixOS#65 / NixOS#211 (08-duplicated-parsers.md, 21-eval-core-evalstate-value.md): - B2 verified by source reading that NixOS#65 has 79 canonical-template sites plus ~135 bespoke. NixOS#211 has 7 structurally-shared bodies, not 10 and not 16: forceAttrs/forceList use withTrace (a different shape) and forceString(NixStringContext &, ...) / forceStringNoCtx delegate to the single-overload forceString. The catalog's proposed merge of NixOS#65+NixOS#211 was rejected on different-risk-profile and different-consumer-scope grounds. NixOS#211 first (~1 week, internal); NixOS#65 second (~4-6 weeks, user-visible trace migration). - NixOS#213 (21-eval-core-evalstate-value.md): - E8+V4 recommend Direction A on four non-perf grounds. V4 downgraded the unsupported "negligible perf benefit" framing and surfaced a critical observation: ExprOpEq::eval evaluates into stack-local Value v1/v2 and ExprVar::eval ends with v = *v2; — the highest- frequency eqValues caller cannot benefit from canonical pointer- equality regardless of direction. - NixOS#18 (03-repeated-boilerplate.md): - B3 verified the hand-written CloneableError derivation count is 17 (catalog said 14). 18a (the MakeError macro itself) is not a real refactor target because MakeError already is CRTP sugar. 18b is per-class because most carry intrinsic payload. 18c is too small for top-level status. Body now documents the SQLiteBusy/SQLiteError cross-link and the BadNixStringContextElem/GitError err.msg- mutation fragility. - NixOS#166 (17-cross-cutting.md): - E7 verified per-file unique-header counts: 8 Source, 5 Sink, 20 Store, 12 EvalState, 7 Value, 6 StorePath, 10 StoreDirConfig. Recommendation: ship serialise-fwd.hh AND store-fwd.hh AND eval-fwd.hh together. Self-forward-decl caveat: don't replace the inline self-decls in store-api.hh and eval.hh. Zero C-API impact. - NixOS#125 (14-vestigial-stdlib.md): - E4+V2+F2 verified the wire-crossing scope. Daemon does NOT link libexpr; libexpr's 107 throws are local-only. Wire-crossing surface is libstore (199 throws, 71 positional %N%, 51 reachable) plus libutil (281 all-format, 50 positional, 45 reachable). V2 found 5 categories of sites E4's grep missed including the load-bearing store-api.hh::Store::requireStoreObjectAccessor. F2 found a second wire-crossing text-grep contract: "is not valid" in BasicClientConnection::queryPathInfo. Phasing constraint: text-grep contracts span both %s and %1% sites; Phase 2 cannot batch positional and non-positional separately for any contract-bearing site. - NixOS#128 (14-vestigial-stdlib.md): - Note added per CLAUDE.md: the landed cleanup/libmain-shared branch bundled this with the unrelated blockInt deletion (NixOS#49). Soft style issue; recorded for future cleanup-branch authors. - NixOS#140 (15-globals-settings.md): - E1's verification cleared the deletion path. nm -m on the built dylib confirms internal linkage; lix already deleted it; commit 50912d0 (2022-03-31) intended full removal but missed the namespace-scope definition. - N41 (24-test-infrastructure-mirrors.md): - V5 verified each fixture body. 28 declaring fixture classes (E6's "22" was an undercount). 19 fit cleanly with subdir-only ctor; 27 of 28 fit with (subdir, suffix) ctor pair. One structural hazard: CaDerivationAdvancedAttrsTest reassigns unitTestData in SetUp() and is linked to DerivationAdvancedAttrsTest via TYPED_TEST_SUITE — needs common abstract base. New candidate NixOS#218 (12-libutil-libstore-core-extras.md): - The Hash::dummy / StorePath::dummy sentinels are overloaded as both "uninitialised placeholder" and "wire-marker for missing". Independent grep identified 16 sites in three classes: placeholder-then-overwrite (6, including two FIXME-tagged sites in nar-info.cc), wire-marker (3 in worker-protocol.cc, serve-protocol.cc, legacy-ssh-store.cc), and test-fixture (3 + one legitimate constant). The right factoring is std::optional<Hash> / std::optional<StorePath> for the placeholder sites and a separately-named sentinel for the wire-marker sites. Resumption documentation: - INVENTORY.md was missing pointers to STATUS.md, AGENT-CHARTER.md, and review/00-INDEX.md. Added a paragraph after the "Consolidated duplication and refactoring candidates" section documenting all three plus the five-step read-first ordering for resumption. - INVENTORY.md updated: 217 per-shard candidates -> 218 (with NixOS#218 added during integration). - STATUS.md cleaned up: dropped the 13 stale "Integration" sub-bullets (those tasks are now in candidate bodies), collapsed the duplicate "E1 implementation" entries, fixed the vague "completed in commit ahead of HEAD~0" line, added "E3 implementation" and "E5 verifiable-counts manifest" to the queue. "Recently completed" annotated to note the post-integration count is 218 + 44. - review/00-INDEX.md updated with an integration-status note above the "How a new agent should pick a report to read" section. Self-check against AGENT-CHARTER.md eight rules: 1. Call graphs walked: V3's UAF chain through ~ProgressBar / ~InterruptCallbackImpl was already in V3's report; B1's addSetting(this) analysis already in B1's report. 2. Shipping artefacts traced: V1's install_headers finding cited in NixOS#134 and NixOS#138 bodies. 3. Counts cited their source: re-derived for the dummy pattern (16 sites) and CloneableError derivations (17); took V-counts where verified (V2's 71/281, V5's 28/19/27/1). 4. Predictions labelled: N41's V5-verified replaces E6's prediction. 5. Inherited claims re-derived: B3 said 22 hand-written CloneableError; my grep produced 17; used 17. 6. Same-shape walked individually: the dummy pattern split into 3 classes (placeholder vs wire-marker vs test) rather than C1's single shape. 7. No invented numbers: V4's downgrade applied to NixOS#213. 8. Comments verified vs code: NixOS#213's "not a singleton" comment treated as hypothesis the consumers contradict. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
angerman
added a commit
to angerman/nix
that referenced
this pull request
Aug 5, 2026
…precision is the bottleneck De-risks the keystone of ARCH_BEAT_TW_PROGRAM before the speculative-strictness build. Added LambdaDescriptor::strictArgsMask (runtime mirror of ir::Function:: strictArgs; foundational for Change 1) + NIX_V3_STRICT_CEILING instrument (gated; counts closure-arg thunks that are statically-proven-strict vs actually-forced-at- runtime, via a side-set to the force-entry). Findings (cache-off; firefox / M5): - static strictArgs proves strict: 142 (0.1%) / 64 (0.03%) of thunk-args. - actually FORCED at runtime: 100,781 (58.6%) / 134,310 (69.8%). => the static analysis captures ~0.1% of the realizable opportunity. - KILLS the hypothesis "extend the static pass to dynamic callees" — the static analysis itself proves almost nothing (needs every-path-forces-before-branch). The right mechanism is RUNTIME SPECULATION (observe-force + guard + deopt), NixOS#143. - Opportunity is REAL but MODEST: ~3.5% of firefox's 2.88M thunks (direct-call path; undercounts curried PAPs). Most thunks are lazy DATA (attrs/lists/let; 65.7% never forced) where eager eval is UNSAFE -> strictness is structurally bounded to the call-arg + known-strict-operand fraction. - Re-scopes Change 1 to a modest single-digit-% lever; bigger CPU/RSS levers stay HAMT (NixOS#2) + JIT (NixOS#4). Refines the NixOS#141 gate (proceed only if prototype beats the darwin-4 noise floor; else ship only NixOS#142 and shift weight to NixOS#2/NixOS#4). strictArgsMask is NOT serialized (default-0 on cache load = conservative), so no on-disk format change. CACHE-COHERENCE-EXEMPT: strictArgsMask is recomputed at emit, never written to or read from the disk cache (deserialize default-constructs it to 0); on-disk LambdaDescriptor format is unchanged. lode/C1_P01_STRICT_CEILING_2026-06-23.md. Copyright (c) 2026 Moritz Angermann <[email protected]>, Input Output Group. SPDX-License-Identifier: Apache-2.0
angerman
added a commit
to angerman/nix
that referenced
this pull request
Aug 5, 2026
…untime-spec mechanism) P0.1 (NixOS#140) measured Change-1's ceiling: static strictArgs captures ~0.1% of the opportunity (58.6-69.8% of thunk-args forced at runtime) -> mechanism must be runtime speculation, not static analysis; ceiling modest (~3.5% of thunks, call-arg path). Bigger levers stay HAMT (NixOS#2) + JIT (NixOS#4). Copyright (c) 2026 Moritz Angermann <[email protected]>, Input Output Group. SPDX-License-Identifier: Apache-2.0
angerman
added a commit
to angerman/nix
that referenced
this pull request
Aug 5, 2026
…; P0.1 scaffold retired Kills hypothesis: "speculative strictness is a worthwhile CPU+RSS lever." Gate decided on measurement (a prototype can only land below the ceiling): - NixOS#140 ceiling: call-arg forced-thunks = 100K(ff)/134K(M5) = ~3.5% of thunks. - NixOS#141 A/B (NO_FUNC_STRICTNESS + NO_STRICT_CALL_UNTHUNK): existing static strictness eliminates only 9,342 thunks (0.32%) on firefox (2,889,344 -> 2,880,002). - Projection: full 3.5% ceiling ≈ 0.4% RSS / ~1% CPU = at/below the darwin-4 noise floor. NixOS#142's target (if-cond/operands) is already force-in-place (never MkThunk'd). The 0.32%->3.5% residual needs optimistic-eval machinery (pure speculation is un-deoptable-unsafe) for ~1% gross. Cost/benefit fails. RE-SCOPE Change 1 (NixOS#141-144): existing static strictness stays (the realized win); NixOS#143/NixOS#142 KILLed; nothing further to ship. Shift weight to Change 2 (HAMT, attacks countDistinct 16-17% + Bindings 142MB) + Change 4 (JIT). Confirms the thesis check: thunks are dominated by lazy DATA (65.7% unforced) that strictness cannot touch -> the data structure (HAMT) + native codegen (JIT) close the gap. Retires the P0.1 scaffold per Rule 0 (re-scope -> delete): reverts LambdaDescriptor::strictArgsMask + the NIX_V3_STRICT_CEILING instrument. hello.drvPath byte-id; ABI rebuild of v3-smoke. lode/C1_P02_VERDICT_2026-06-23.md. Copyright (c) 2026 Moritz Angermann <[email protected]>, Input Output Group. SPDX-License-Identifier: Apache-2.0
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.
No description provided.