pi-lens 4.4.6 → 4.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +5 -1
  3. package/dist/{chunk-JL6CXUMW.js → chunk-24BILSZW.js} +1 -1
  4. package/dist/{chunk-S67UJDGQ.js → chunk-2TF6RXWB.js} +5 -5
  5. package/dist/{chunk-ARD426WI.js → chunk-3F6BMY53.js} +1 -1
  6. package/dist/{chunk-5ZR3APIM.js → chunk-3FRLWYBG.js} +26 -26
  7. package/dist/{chunk-T7FTXGS3.js → chunk-3K2F6UDZ.js} +30 -30
  8. package/dist/{chunk-HK6JVFZC.js → chunk-3YY7IXIL.js} +2 -2
  9. package/dist/chunk-46TNM7XZ.js +88 -0
  10. package/dist/{chunk-4AVZ3TG7.js → chunk-4L36HG27.js} +8 -8
  11. package/dist/{chunk-PO45POGF.js → chunk-4LM3VAZH.js} +1 -1
  12. package/dist/{chunk-UN4TEBWN.js → chunk-4LOE5R5P.js} +9 -9
  13. package/dist/{chunk-KLQVC3XC.js → chunk-4YHYPW2G.js} +30 -7
  14. package/dist/{chunk-W5LGKNET.js → chunk-4ZYJHQMB.js} +6 -6
  15. package/dist/{chunk-W2V54OCL.js → chunk-6IR3ZYIB.js} +2 -2
  16. package/dist/{chunk-FJIVKLPH.js → chunk-72OKUXSD.js} +10 -10
  17. package/dist/{chunk-7RQXA5GG.js → chunk-75GAYVNO.js} +10 -9
  18. package/dist/{chunk-V3APN3DY.js → chunk-7E2563GA.js} +12 -12
  19. package/dist/{chunk-4WX4CTUE.js → chunk-7GLOLOSH.js} +25 -25
  20. package/dist/{chunk-BWYQUPOS.js → chunk-ABPKUVA4.js} +1 -1
  21. package/dist/{chunk-IPDG45G5.js → chunk-AKUUMGD5.js} +9 -9
  22. package/dist/{chunk-Q6D6VMI4.js → chunk-ASUXV767.js} +6 -6
  23. package/dist/{chunk-BM5GS6ZH.js → chunk-AWDSEDER.js} +2 -2
  24. package/dist/{chunk-MA77RSFN.js → chunk-BZARLRJW.js} +4 -4
  25. package/dist/{chunk-EVDGNG4F.js → chunk-CB4WHS4H.js} +3 -3
  26. package/dist/{chunk-FA5LDARD.js → chunk-CCV2EU7T.js} +7 -7
  27. package/dist/{chunk-U6OC3QEM.js → chunk-CE6VMBCB.js} +15 -15
  28. package/dist/{chunk-AMXIUN2R.js → chunk-CPSR3AVL.js} +2 -2
  29. package/dist/{chunk-SXGD4ANG.js → chunk-CTADOKYM.js} +7 -7
  30. package/dist/{chunk-63RIVFQI.js → chunk-DH5JPM3K.js} +1 -1
  31. package/dist/{chunk-MT6BVNFW.js → chunk-DPGEAHZT.js} +3 -3
  32. package/dist/{chunk-4PCQCU47.js → chunk-DQZFQSR5.js} +2 -2
  33. package/dist/{chunk-BHUWL2Y3.js → chunk-E7HJ56Y7.js} +5 -5
  34. package/dist/{chunk-DQXSPYRI.js → chunk-EAOK7MIZ.js} +2 -2
  35. package/dist/{chunk-2RLWJO5K.js → chunk-EKWX4WD3.js} +3 -3
  36. package/dist/{chunk-WIZWZR4C.js → chunk-F7K5IBZG.js} +30 -28
  37. package/dist/{chunk-VQH24FIP.js → chunk-FB5SCCPT.js} +9 -9
  38. package/dist/{chunk-GZE7WOI4.js → chunk-FZKFVUEC.js} +438 -140
  39. package/dist/{chunk-TIYGSODX.js → chunk-H7OR7DFZ.js} +15 -13
  40. package/dist/{chunk-CJYKEW2L.js → chunk-HO6LWE2E.js} +1 -1
  41. package/dist/{chunk-YSBHPOY6.js → chunk-HR3OJ3TH.js} +8 -8
  42. package/dist/{chunk-CFRQMBGP.js → chunk-HWDAVBFU.js} +14 -14
  43. package/dist/{chunk-2X4VLOCC.js → chunk-JJ2RRESP.js} +8 -5
  44. package/dist/{chunk-YBSONGSZ.js → chunk-JMEKXFOL.js} +24 -24
  45. package/dist/{chunk-MKVZQUEG.js → chunk-KDX35VXP.js} +69 -13
  46. package/dist/{chunk-75SY4F24.js → chunk-KKCK636N.js} +7 -7
  47. package/dist/{chunk-OLAWH5UQ.js → chunk-KPPJTH44.js} +2 -1
  48. package/dist/{chunk-5APMQ2IJ.js → chunk-KW5JQPO5.js} +1 -1
  49. package/dist/{chunk-SCIUNBPF.js → chunk-L3CMBQMH.js} +11 -11
  50. package/dist/{chunk-GAACZY6R.js → chunk-L5JYIU47.js} +7 -7
  51. package/dist/{chunk-2DDDCJDL.js → chunk-LBLBAFG3.js} +3 -3
  52. package/dist/{chunk-NNKXDXXS.js → chunk-LLS45EWB.js} +8 -0
  53. package/dist/{chunk-WQOIR3QY.js → chunk-LS3QJRUB.js} +7 -7
  54. package/dist/{chunk-XCUHKYCQ.js → chunk-LSC3VADM.js} +6 -6
  55. package/dist/{chunk-GMTFDAOK.js → chunk-LUBPZN36.js} +6 -6
  56. package/dist/{chunk-DMSLNKF7.js → chunk-LV4UMYVH.js} +19 -19
  57. package/dist/{chunk-XAIT2YGS.js → chunk-MB6PXBUA.js} +2 -2
  58. package/dist/{chunk-AE37FEGH.js → chunk-MNJIXFX4.js} +1 -1
  59. package/dist/{chunk-OJLTLYHB.js → chunk-MPKRJBPK.js} +30 -10
  60. package/dist/{chunk-QGSTQH4D.js → chunk-N5WSK2K7.js} +6 -6
  61. package/dist/{chunk-Z7IGUAXL.js → chunk-NA7SEXHE.js} +10 -6
  62. package/dist/{chunk-UHGF5UT5.js → chunk-O4BJFESU.js} +1 -1
  63. package/dist/{chunk-UCGQT677.js → chunk-OE5ZBP7F.js} +10 -10
  64. package/dist/{chunk-KSR7RGQY.js → chunk-OXOI55RU.js} +4 -4
  65. package/dist/{chunk-NDMCVUYK.js → chunk-PR6PO3ES.js} +2 -2
  66. package/dist/{chunk-NIU2IPC5.js → chunk-PUZ3E2J4.js} +3 -3
  67. package/dist/{chunk-2DMLM3ZO.js → chunk-QHSNL7B2.js} +8 -8
  68. package/dist/{chunk-ZYNI26MI.js → chunk-QOE342SU.js} +1 -1
  69. package/dist/{chunk-3WEPUD2V.js → chunk-R5MOQM2H.js} +98 -31
  70. package/dist/{chunk-PPIBVH4R.js → chunk-RC2Z6K47.js} +4 -4
  71. package/dist/{chunk-LEJOJDXL.js → chunk-RORGS5II.js} +4 -4
  72. package/dist/{chunk-K2YGBXOA.js → chunk-RQS4QQSD.js} +1 -1
  73. package/dist/{chunk-XQCSWV2G.js → chunk-RRV3FNNM.js} +10 -10
  74. package/dist/{chunk-GTAI2J6U.js → chunk-SHLDT3OI.js} +8 -8
  75. package/dist/{chunk-VPBIMOAQ.js → chunk-SNDXCFRS.js} +11 -9
  76. package/dist/{chunk-Q4FCYCRE.js → chunk-T7A2HK2B.js} +10 -10
  77. package/dist/{chunk-MN7MHUXQ.js → chunk-U5HPROLA.js} +1 -1
  78. package/dist/{chunk-ZUUI3ZSA.js → chunk-U6VN4NVL.js} +1 -1
  79. package/dist/{chunk-W5R5SABV.js → chunk-U7BD2QL7.js} +6 -6
  80. package/dist/{chunk-P4QNXS6I.js → chunk-UF7RTZSO.js} +8 -8
  81. package/dist/{chunk-A3YNG5KP.js → chunk-URCQWAQ4.js} +11 -11
  82. package/dist/{chunk-FFL3A2VP.js → chunk-VUZWQ7UG.js} +4 -4
  83. package/dist/{chunk-YRD4ISED.js → chunk-W4WP2ERB.js} +10 -10
  84. package/dist/{chunk-OOU2WZZE.js → chunk-WDBICWH3.js} +1 -1
  85. package/dist/{chunk-BI5LAQ3Y.js → chunk-WGRJOXED.js} +114 -148
  86. package/dist/{chunk-ZQ6NZZTB.js → chunk-WME2OQST.js} +33 -0
  87. package/dist/{chunk-DC4CFXM5.js → chunk-XT2HTCJ5.js} +1 -1
  88. package/dist/{chunk-SJJYRZB4.js → chunk-Y7F7IEE3.js} +55 -23
  89. package/dist/{chunk-2F47TQOA.js → chunk-YES5CACN.js} +29 -29
  90. package/dist/{chunk-H7HTEQUZ.js → chunk-YHC2O2WO.js} +7 -7
  91. package/dist/{chunk-Q3UZHW6N.js → chunk-YVHBNSME.js} +6 -10
  92. package/dist/{chunk-3MYEA7QD.js → chunk-ZE3KXHS7.js} +2 -2
  93. package/dist/{chunk-VG5JS5SW.js → chunk-ZGSJDWQU.js} +2 -2
  94. package/dist/{chunk-5CV5ITZF.js → chunk-ZJTT47IG.js} +1 -1
  95. package/dist/{chunk-Q4EMRFNA.js → chunk-ZMAUPOMG.js} +24 -24
  96. package/dist/index.js +1925 -944
  97. package/dist/mcp/analyze-cli.js +6 -6
  98. package/dist/mcp/cli.js +30 -30
  99. package/dist/mcp/server.js +707 -455
  100. package/dist/mcp/worker.js +48 -48
  101. package/dist/probes/installer.js +13 -13
  102. package/docs/agent-tools.md +11 -3
  103. package/docs/defect-shapes.md +15 -1
  104. package/docs/dependencies.md +1 -0
  105. package/docs/environment-variables.md +14 -0
  106. package/docs/features.md +11 -1
  107. package/docs/globalconfig.md +12 -1
  108. package/docs/invariants/git-guard-host.md +34 -0
  109. package/docs/invariants/lsp-trust-exec.md +6 -0
  110. package/docs/invariants/session-telemetry.md +42 -2
  111. package/docs/lsp-capability-matrix.md +89 -45
  112. package/docs/lsp-idle-eviction.md +3 -5
  113. package/docs/pi-lens-fixer.md +8 -1
  114. package/docs/pi-lens-merge-policy.md +7 -4
  115. package/docs/pi-lens-subagent.md +7 -4
  116. package/docs/schema/pi-lens-config-v1.json +23 -0
  117. package/docs/servercapabilities.md +1 -1
  118. package/docs/settings.md +5 -0
  119. package/docs/usage.md +5 -0
  120. package/package.json +1 -1
  121. package/dist/chunk-G2B7F6ZU.js +0 -88
package/CHANGELOG.md CHANGED
@@ -16,6 +16,89 @@ All notable changes to pi-lens will be documented in this file.
16
16
 
17
17
  ### Security
18
18
 
19
+ ## [4.4.7] - 2026-10-29
20
+
21
+ ### Added
22
+
23
+ - **Projects with `@effect/tsgo` get Effect's TypeScript-Go language server (refs #4914)** — when a project installs `@effect/tsgo` beside TypeScript 7 or newer, pi-lens launches the project's own `effect-tsgo tsc --lsp --stdio` for TypeScript files, so the Effect language service's diagnostics reach pi-lens. Installing the package is the opt-in; there is no pi-lens setting. Projects without it keep the native TypeScript 7 or classic launch, a malformed `@effect/tsgo` install falls back to the native launch, and the binary follows the same project-trust gate as the project's compiler. pi-lens never installs `@effect/tsgo` or runs its setup. Requested by @forge18.
24
+
25
+ - **Opt-in fallow-lsp: unused-export and dead-code findings for JS/TS files (refs #4929)** — set `fallow.enabled: true` in `~/.pi-lens/config.json` (or pass `--lens-fallow`) and pi-lens downloads the pinned fallow-lsp 3.37.0 release, checks its sha256, and runs it beside the TypeScript server on `.ts`, `.tsx`, `.mts`, `.cts`, `.js`, `.jsx`, `.mjs` and `.cjs` files only. Findings arrive as advisory warnings tagged `fallow:<rule>` and never block. It is off by default; any value other than a literal `true` leaves it off, nothing is downloaded or launched while it is off, and the install and launch follow the same project-trust gate as the other language servers. knip, jscpd and madge are unchanged.
26
+
27
+ ### Fixed
28
+
29
+ - **A Python config or stub changed outside pi now reaches the running server (#4532)** — a `pyrightconfig.json` or `pyproject.toml` created, edited or deleted after pyright answered is forwarded to it as a watched-files event at the next look, so an `extraPaths` finding clears on the next read instead of staying stale for the server's life. Python `.pyi` stubs changed outside pi are forwarded like `.d.ts` files. A dependency install into a virtualenv with no lockfile is still not detected.
30
+
31
+ - **Stop labelling a late runner's current findings as historical on a turn that wrote no file.** The turn-end stamp now covers the file a delivered late-runner or replayed-blocker section cites, and a message on such a turn that also carries a section citing no file is labelled historical. (refs #4617)
32
+
33
+ - **Stop labelling current turn-end findings as historical on turns that wrote no file.** The turn-end stamp now covers the files a resolution retired and the files its cascade, pending-error and late-auxiliary sections cite, with `--lens-guard` on or off. (refs #4617)
34
+
35
+ - **The home-folder ceiling holds when HOME or the project is reached through a link (#4911)** — The startup scan, the session snapshot root, the cheap project scan, the heavyweight analyzers, jscpd, the word index, the review graph, the LSP workspace sweep, the TypeScript server lookup, project-local binary lookup, `ast_grep_search` and `lens_diagnostics` compare the home folder and the root by real path. A symlinked or junctioned `HOME` (for example `/home` linked to `/var/home`), or a root spelled through such a link, no longer lets a scan walk the whole home tree.
36
+
37
+ - **`--no-lens` and three sibling command-line flags now take effect (#4913)** — `--no-lens`, `--no-lens-context`, `--lens-compact-tool-line` and `--no-tool <name>` were ignored because pi applies an extension flag's command-line value after the extension has loaded, so pi-lens read the registered default and ignored it. `pi --no-lens` still started language servers and ran the write-time runners; `--no-tool` only worked in the `--no-tool=<name>` spelling. pi-lens now reads these four at `session_start`, so `/lens-toggle` and `/lens-context-toggle` still win for the rest of the session. A tool named by `--no-tool` is dropped from the active set, and `pi_lens_activate_tools` refuses it.
38
+
39
+ - **Python docstrings now show in the module outline and `read_symbol` (#4948)** — a Python def or class documented by a docstring carried no description, because only a `#` comment above it was read. The first sentence of the docstring (`"""`, `'''`, `r"""`, `u"""` or a one-line string) is now its description, capped at 120 characters. A `#` comment above the def still works, and the docstring wins when both exist. `read_symbol` still starts at the `def` line.
40
+
41
+ - **A slow runner that could not read its tool's output is reported once, as a failure, and never blocks (refs #4130)** — a collect-later runner fault reached the agent twice at turn end (the failure note and its own synthetic diagnostic), and the cue and gleam faults carried blocking severity, so a tool that could not parse its output entered the blocker map and stopped `git commit`. Runner faults are now built at one seam as non-blocking warnings, and the deferred verdict drops them because the failure note already says it.
42
+
43
+ - **A held file changed outside pi now reads fresh on the first diagnostics call (refs #4532)** — `lsp_diagnostics`, `lens_diagnostics source=lsp` and `lsp_navigation workspaceDiagnostics` run the forced document-drift sweep before they answer, so a file the language server already holds and that was copied or written outside pi (a `cp`, a shell redirect) is re-pushed first, and an importer's finding clears on the first call instead of the second. The pre-answer pass checks every held document and re-pushes every one that changed; the turn-settle sweep keeps its 64-document and 4-resync pacing. A held file that grew past the LSP sync limit is no longer pushed by a drift resync; its record stays and the next pass retries.
44
+
45
+ - **A module changed outside pi no longer leaves its importer's diagnostics stale (refs #4532)** — when a file the diagnosed file imports directly was changed outside pi and no language server held it open, the server kept the old bytes it had read, so `lsp_diagnostics` reported (or missed) errors against the old module on the first call and every call after it. Each direct import no server holds is now compared with the bytes last seen, and a changed one is sent to its servers before the read, so the first call already answers against the new bytes. Each call that sends writes one `lsp_unheld_dependency_changed` row.
46
+
47
+ - **A bash result that joins a running look still gets its declaration walk (refs #4532)** — when a tool call's look was in flight, a bash result that joined it got only the tool call's throttled look, so a `.d.ts` its command generated reached no language server until a later walk. The joined bash result's walk demand now rides the flight, in both the out-of-band look and the HEAD look, and the `lsp_out_of_band_change` row says `joinedWalk: true` when the walk was a joiner's.
48
+
49
+ - **An unresolved blocker reaches the agent once per set, not on every turn that writes another file (refs #4921)** — the turn-end duplicate check keyed the turn's written-file set, so an unfixed blocker was sent again on each turn that touched a different file, and under `--lens-guard` on each repeated turn too; it now keys the delivered content, a changed or reintroduced blocker still arrives, and the commit gate keeps refusing while the blocker stands.
50
+
51
+ - **A subagent no longer receives the parent session's blockers:** with two sessions in one pi process (an in-process subagent), each turn end now delivers, sweeps and re-judges only the inline blockers its own session's writes recorded, and the commit-gate record files each session's blocker section under that session's id. A subagent's turn end no longer saves the parent's session state into the subagent's project data dir or stamps that project's duplicate-findings record with the parent's id (refs #4921).
52
+
53
+ - **A pi-lens status read no longer leaves `.git/index.lock` behind, so `git add` keeps working (#4930)** — the spawn seam now defaults `GIT_OPTIONAL_LOCKS=0` for every child, so the background `git status` reads skip the opportunistic index refresh whose lock a timeout or host exit could orphan; an exported `GIT_OPTIONAL_LOCKS` in your shell does not undo it for pi-lens's own git status reads, while a runner that passes its own environment keeps your value. On a checkout whose index is stat-dirty, each status read now re-hashes the dirty files until your own git command refreshes the index.
54
+
55
+ - **A subagent's commit is no longer refused for a blocker in another repository:** with `--lens-guard` and two sessions in one pi process, the commit gate now judges the blockers inside the repository being committed instead of every blocker the process holds, and its refusal names only that repository's blocker. A commit where the blocker lives, by any session, is still refused, and a command the gate cannot place in a repository (`cd` first, `--git-dir`, an environment prefix, a wrapper) is still judged by every blocker (refs #4941).
56
+
57
+ - **A subagent's read no longer licenses the parent's edit, nor the reverse:** with two sessions in one pi process (an in-process subagent), the read guard now keeps each session's read records and write authorship apart, so an edit is refused unless the editing session has its own authorization for the file: its own read, its own write authorship, or an exemption it armed. Another session's read or exemption no longer counts, nor does another session's write that names its own session. A session's own read still licenses its own edit (refs #4942).
58
+
59
+ - **The MCP server no longer takes a pi session's staged findings:** when pi and an MCP client (the Stop hook or `lens_turn_end`) work in the same project, the MCP side now reads only the turn-end message an MCP server staged, so a pi session's blocker is no longer shown to the MCP client as a historical finding and marked delivered before the pi session sees it; a restarted MCP server still delivers what the previous one staged, except a message a commit-gate rewrite has replaced since (refs #4943).
60
+
61
+ - **A subagent's edits are logged under its own session:** with two sessions in one pi process (an in-process subagent), the change log, the diagnostics log and the read-guard log now name the session that made the write, and a runner answer that finished after the subagent's edit (a collect-later run) is drained by that subagent's turn end, with its blocker recorded as the subagent's own instead of the parent session's (refs #4943).
62
+
63
+ - **Turn-end findings reach only the session that produced them:** with two sessions in one pi process (an in-process subagent), the blockers and advisories a session's turn end staged for its next request are no longer taken by the other session's request first, so a subagent no longer loses its own blocker to the parent session, and the parent no longer reads the subagent's. A subagent's own test-runner results now reach the subagent instead of no one. A new session that replaces the one that staged a message (`/new`, a fork, or a fresh process) no longer receives that unconsumed message (refs #4943).
64
+
65
+ - **`--no-ast-grep` and `astGrep.enabled=false` now switch the ast-grep server off.** The kill switch the server already read was never registered, so neither spelling existed; `lens_diagnostics mode=full` also now leaves a switched-off auxiliary server unstarted and names it, and a peer pi-lens session's findings from a switched-off server (`--no-opengrep` included) are no longer shown (refs #4944).
66
+
67
+ - **`--no-zizmor`, `--no-typos` and `--lens-spotbugs` now exist, with `*.enabled` config keys.** The zizmor and typos servers read kill switches the registry never registered, so neither could be switched off. SpotBugs was documented as opt-in behind a flag that did not exist, so it never ran; it stays off unless you set the flag or `spotbugs.enabled=true` (refs #4946).
68
+
69
+ - **read_symbol and module_report warn when a file has syntax errors (#4949)** — Tree-sitter recovers from syntax it cannot parse and drops declarations, so a `read_symbol` or `read_enclosing` miss in such a file read as "not there". A miss, and every `module_report`, now carries "tree-sitter could not parse part of this file; the symbol list may be incomplete." A `read_symbol` hit and a clean file are unchanged.
70
+
71
+ ### Internal
72
+
73
+ <details>
74
+ <summary>12 internal changes: tests, CI, tooling, and refactors</summary>
75
+
76
+ - Tool-smoke now fails a runner whose tool was killed, timed out or rejected its invocation, instead of rendering it as a skipped tool. The skip carries the fault kind, and an absent tool still skips. A run cut short after it printed (cue-vet, gleam-check, prisma-validate, terragrunt) keeps its findings but no longer counts as a completed check, and trivy-config names a failed launch as did-not-run. (refs #4130)
77
+
78
+ - The Bash guard hook now follows `cd -P` physically, resolves a not-yet-existing destination below a symlinked parent through its nearest existing ancestor, and no longer loses a command after a `case` pattern or `$'\''` inside `$( )` (refs #4060).
79
+
80
+ - The LSP capability nightly records each matrix row's server `version` and `install` source, keeps a missed probe's last known value marked `stale` with its date instead of rewriting it to `unknown`, raises a cell that missed two consecutive nights on one tracking issue, and composes the refresh PR body with its capability flips; with the refresh GitHub App configured the PR starts CI on its own and a flip-free refresh can be armed for auto-merge (refs #4512).
81
+
82
+ - The owning root is registered by its path identity when a file link from outside reaches no registrable ancestor, and `deferred_format_queued` is logged only for a deferral the coordinator accepts; the symlink fixture family gains the other-worktree and unrelated-repository members (refs #4689).
83
+
84
+ - **Raw realpath calls feeding a config root, a write target and the data-dir probe move onto the identity seam (refs #4689)** — `clients/sgconfig.ts` and `clients/partial-edit-apply.ts` resolve through `realpathOrResolve`, and `dataDirCanonicalRoot` answers `fallback` with an existence check instead of a discarded `realpathSync`; the foreign-checkout lookup in `clients/test-runner-client.ts` keeps its raw realpaths and the sweep pin now says why.
85
+
86
+ - The review-graph ignore-gated node test follows the lane's test-timeout scale instead of the 5 s default, so a slow Windows runner no longer times it out (closes #4910).
87
+
88
+ - The stale-ctx session-start scan test drains its background snapshot writes before it removes its fixture root, so a late write no longer recreates the root for the tmp-fixture hygiene census (#4958).
89
+
90
+ - The `## Detection` PR-body check is owed by any PR that closes, or whose `Refs` line or title names, an issue labelled `bug` or `nightly-drift`, not only by one that closes a `bug` issue; CI refuses a label it cannot read and, unless the body already closes a bug, a `owner/repo#N` or URL reference, and the local preflight warns and skips an unreadable label (refs #4968).
91
+
92
+ - Quick and full session start share one sequence-read and snapshot-hydrate step instead of two 60-line copies and the shared step's sequence read is capped at the session_start wall budget even under a widened `PI_LENS_SEQUENCE_READ_BUDGET_MS` (refs #4907).
93
+
94
+ - Five fast-check properties pin pure identity and freshness seams in their existing test files: the `dd:` and `ddw:` anchors, the rows the disposition filters read, `lineContentHash`, `freshnessFromMtime` and the workspace id (refs #4928).
95
+
96
+ - Tier 2 (`tests/support/pi-session.ts`) gains an opt-in inline-factory mode, and six test files leave the pi double for it: the three lazy-liveness files, `bootstrap-lazy-liveness`, `index-cascade-resolved-clean-wiring` and `index-observed-sweep-no-read-guard`. The `--no-delta` case of `index-4483` moves to a tier-2 file with pi's real flag (refs #4937).
97
+
98
+ - Every session-state registry entry now names its owner key (`session`, `repository`, `project` or `process-wide: <reason>`), the coordinator's per-turn warnings, the cache observability's per-session state and the memory sampler's pending turn end moved onto scope cells that end with their session's scope (reached by session id through `sessionCell`), and the conformance test refuses a `session` owner that states no reason a scope cell cannot hold it (defect shape 72, refs #4965).
99
+
100
+ </details>
101
+
19
102
  ## [4.4.6] - 2026-10-27
20
103
 
21
104
  ### Changed
package/README.md CHANGED
@@ -136,7 +136,7 @@ flowchart TD
136
136
  Architecture-level view, updated when a lane changes. Per-tool inventories live
137
137
  in [features](docs/features.md) and
138
138
  [language coverage](docs/language-coverage.md). Today the edit-time lane carries
139
- 45+ runner modules over 35+ file kinds, and the LSP lane speaks to 47
139
+ 45+ runner modules over 35+ file kinds, and the LSP lane speaks to 50
140
140
  language server definitions.
141
141
 
142
142
  The gating box is an abstraction, not a call order. Freshness covers several
@@ -538,6 +538,10 @@ Thanks goes to these wonderful people:
538
538
  <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/letwir"><img src="https://avatars.githubusercontent.com/u/16576177?v=4" width="100px;" alt=""/><br /><sub><b>letwir</b></sub></a><br /><a href="#doc-letwir" title="Documentation">📖</a></td>
539
539
  <td align="center" valign="top" width="14.28%"><a href="http://www.erikdarling.com/"><img src="https://avatars.githubusercontent.com/u/2136037?v=4" width="100px;" alt=""/><br /><sub><b>Erik Darling</b></sub></a><br /><a href="#bug-erikdarlingdata" title="Bug reports">🐛</a></td>
540
540
  </tr>
541
+ <tr>
542
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Silvio-Re"><img src="https://avatars.githubusercontent.com/u/5860449?v=4" width="100px;" alt=""/><br /><sub><b>Silvio</b></sub></a><br /><a href="#bug-Silvio-Re" title="Bug reports">🐛</a></td>
543
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/forge18"><img src="https://avatars.githubusercontent.com/u/31629847?v=4" width="100px;" alt=""/><br /><sub><b>forge18</b></sub></a><br /><a href="#ideas-forge18" title="Ideas & Planning">🤔</a></td>
544
+ </tr>
541
545
  </tbody>
542
546
  </table>
543
547
 
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  resolveOpengrepRulePack
4
- } from "./chunk-UHGF5UT5.js";
4
+ } from "./chunk-O4BJFESU.js";
5
5
  import {
6
6
  findLocalToolConfig
7
7
  } from "./chunk-PQJFG24Z.js";
@@ -7,13 +7,13 @@ import {
7
7
  loadCallGraph,
8
8
  parseSymbolKey,
9
9
  saveCallGraph
10
- } from "./chunk-W2V54OCL.js";
10
+ } from "./chunk-6IR3ZYIB.js";
11
11
  import "./chunk-3MED75HT.js";
12
- import "./chunk-Q3UZHW6N.js";
13
- import "./chunk-OLAWH5UQ.js";
12
+ import "./chunk-YVHBNSME.js";
13
+ import "./chunk-KPPJTH44.js";
14
14
  import "./chunk-J6JP25XU.js";
15
- import "./chunk-MN7MHUXQ.js";
16
- import "./chunk-ZQ6NZZTB.js";
15
+ import "./chunk-U5HPROLA.js";
16
+ import "./chunk-WME2OQST.js";
17
17
  import "./chunk-KXF5R4UN.js";
18
18
  import "./chunk-S26LC76R.js";
19
19
  import "./chunk-Z2XAOKHK.js";
@@ -2,7 +2,7 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
2
2
  import {
3
3
  getGlobalPiLensDir,
4
4
  safeSpawnAsync
5
- } from "./chunk-Q3UZHW6N.js";
5
+ } from "./chunk-YVHBNSME.js";
6
6
  import {
7
7
  createSingleFlight
8
8
  } from "./chunk-AWQWXSW4.js";
@@ -4,65 +4,65 @@ import {
4
4
  } from "./chunk-7U2IDNXN.js";
5
5
  import {
6
6
  formatToolFailure
7
- } from "./chunk-SJJYRZB4.js";
7
+ } from "./chunk-Y7F7IEE3.js";
8
8
  import {
9
9
  spawnFailedWithNoOutput
10
- } from "./chunk-2X4VLOCC.js";
10
+ } from "./chunk-JJ2RRESP.js";
11
11
  import {
12
12
  createAvailabilityChecker,
13
13
  findManagedNodeToolBinary,
14
14
  getManagedToolEnvironment,
15
15
  resolveAvailableOrInstall
16
- } from "./chunk-V3APN3DY.js";
17
- import "./chunk-XAIT2YGS.js";
18
- import "./chunk-3WEPUD2V.js";
19
- import "./chunk-JL6CXUMW.js";
20
- import "./chunk-NDMCVUYK.js";
21
- import "./chunk-PPIBVH4R.js";
16
+ } from "./chunk-7E2563GA.js";
17
+ import "./chunk-MB6PXBUA.js";
18
+ import "./chunk-R5MOQM2H.js";
19
+ import "./chunk-24BILSZW.js";
20
+ import "./chunk-PR6PO3ES.js";
21
+ import "./chunk-RC2Z6K47.js";
22
22
  import "./chunk-PKES3ISE.js";
23
23
  import "./chunk-ZKXQKGWZ.js";
24
- import "./chunk-ZUUI3ZSA.js";
24
+ import "./chunk-U6VN4NVL.js";
25
25
  import "./chunk-TIQJPRDD.js";
26
26
  import "./chunk-YISME6ON.js";
27
- import "./chunk-UHGF5UT5.js";
27
+ import "./chunk-O4BJFESU.js";
28
28
  import "./chunk-CKEQFGLT.js";
29
- import "./chunk-CJYKEW2L.js";
30
- import "./chunk-VPBIMOAQ.js";
31
- import "./chunk-ZYNI26MI.js";
29
+ import "./chunk-HO6LWE2E.js";
30
+ import "./chunk-SNDXCFRS.js";
31
+ import "./chunk-QOE342SU.js";
32
32
  import "./chunk-2BEMIWEW.js";
33
33
  import "./chunk-IJYGIDF4.js";
34
34
  import {
35
35
  logSessionStart
36
- } from "./chunk-MKVZQUEG.js";
37
- import "./chunk-MT6BVNFW.js";
36
+ } from "./chunk-KDX35VXP.js";
37
+ import "./chunk-DPGEAHZT.js";
38
38
  import {
39
39
  findLocalBinUpwards,
40
40
  localBinPath
41
- } from "./chunk-Z7IGUAXL.js";
42
- import "./chunk-ARD426WI.js";
41
+ } from "./chunk-NA7SEXHE.js";
42
+ import "./chunk-3F6BMY53.js";
43
43
  import {
44
44
  createAvailabilityLatch,
45
45
  describeUnavailability
46
- } from "./chunk-5APMQ2IJ.js";
47
- import "./chunk-NIU2IPC5.js";
48
- import "./chunk-BWYQUPOS.js";
49
- import "./chunk-2RLWJO5K.js";
50
- import "./chunk-VG5JS5SW.js";
46
+ } from "./chunk-KW5JQPO5.js";
47
+ import "./chunk-PUZ3E2J4.js";
48
+ import "./chunk-ABPKUVA4.js";
49
+ import "./chunk-EKWX4WD3.js";
50
+ import "./chunk-ZGSJDWQU.js";
51
51
  import {
52
52
  canonicalDirectory,
53
53
  getProjectDataDir,
54
54
  listNestedLinkedWorktreeRoots,
55
55
  safeSpawnAsync
56
- } from "./chunk-Q3UZHW6N.js";
56
+ } from "./chunk-YVHBNSME.js";
57
57
  import "./chunk-AWQWXSW4.js";
58
58
  import "./chunk-QYF5S6P6.js";
59
59
  import "./chunk-RZOXUSPC.js";
60
- import "./chunk-OLAWH5UQ.js";
60
+ import "./chunk-KPPJTH44.js";
61
61
  import "./chunk-J6JP25XU.js";
62
- import "./chunk-MN7MHUXQ.js";
62
+ import "./chunk-U5HPROLA.js";
63
63
  import {
64
64
  incrementDegradationCount
65
- } from "./chunk-ZQ6NZZTB.js";
65
+ } from "./chunk-WME2OQST.js";
66
66
  import {
67
67
  createSubsystemLogger
68
68
  } from "./chunk-KXF5R4UN.js";
@@ -55,53 +55,53 @@ import {
55
55
  reviewGraphCachePath,
56
56
  terminateReviewGraphPersistWorkerForTests,
57
57
  waitForReviewGraphPersistsForTests
58
- } from "./chunk-TIYGSODX.js";
58
+ } from "./chunk-H7OR7DFZ.js";
59
59
  import "./chunk-3MED75HT.js";
60
- import "./chunk-GZE7WOI4.js";
61
- import "./chunk-DC4CFXM5.js";
60
+ import "./chunk-FZKFVUEC.js";
61
+ import "./chunk-XT2HTCJ5.js";
62
62
  import "./chunk-XIMYZ3JA.js";
63
- import "./chunk-3WEPUD2V.js";
64
- import "./chunk-JL6CXUMW.js";
65
- import "./chunk-NDMCVUYK.js";
66
- import "./chunk-PPIBVH4R.js";
63
+ import "./chunk-R5MOQM2H.js";
64
+ import "./chunk-24BILSZW.js";
65
+ import "./chunk-PR6PO3ES.js";
66
+ import "./chunk-RC2Z6K47.js";
67
67
  import "./chunk-F5Z6URKM.js";
68
68
  import "./chunk-5W3R6LFT.js";
69
- import "./chunk-OJLTLYHB.js";
70
- import "./chunk-63RIVFQI.js";
69
+ import "./chunk-MPKRJBPK.js";
70
+ import "./chunk-DH5JPM3K.js";
71
71
  import "./chunk-PKES3ISE.js";
72
72
  import "./chunk-ZKXQKGWZ.js";
73
- import "./chunk-GAACZY6R.js";
73
+ import "./chunk-L5JYIU47.js";
74
74
  import "./chunk-Z54ZSOBZ.js";
75
- import "./chunk-ZUUI3ZSA.js";
75
+ import "./chunk-U6VN4NVL.js";
76
76
  import "./chunk-TIQJPRDD.js";
77
77
  import "./chunk-YISME6ON.js";
78
78
  import "./chunk-6HWVI6MI.js";
79
- import "./chunk-UHGF5UT5.js";
79
+ import "./chunk-O4BJFESU.js";
80
80
  import "./chunk-CKEQFGLT.js";
81
- import "./chunk-CJYKEW2L.js";
82
- import "./chunk-VPBIMOAQ.js";
83
- import "./chunk-ZYNI26MI.js";
84
- import "./chunk-BM5GS6ZH.js";
85
- import "./chunk-NNKXDXXS.js";
81
+ import "./chunk-HO6LWE2E.js";
82
+ import "./chunk-SNDXCFRS.js";
83
+ import "./chunk-QOE342SU.js";
84
+ import "./chunk-AWDSEDER.js";
85
+ import "./chunk-LLS45EWB.js";
86
86
  import "./chunk-2BEMIWEW.js";
87
87
  import "./chunk-IJYGIDF4.js";
88
- import "./chunk-MKVZQUEG.js";
89
- import "./chunk-MT6BVNFW.js";
90
- import "./chunk-Z7IGUAXL.js";
91
- import "./chunk-ARD426WI.js";
92
- import "./chunk-5APMQ2IJ.js";
93
- import "./chunk-NIU2IPC5.js";
94
- import "./chunk-BWYQUPOS.js";
95
- import "./chunk-2RLWJO5K.js";
96
- import "./chunk-VG5JS5SW.js";
97
- import "./chunk-Q3UZHW6N.js";
88
+ import "./chunk-KDX35VXP.js";
89
+ import "./chunk-DPGEAHZT.js";
90
+ import "./chunk-NA7SEXHE.js";
91
+ import "./chunk-3F6BMY53.js";
92
+ import "./chunk-KW5JQPO5.js";
93
+ import "./chunk-PUZ3E2J4.js";
94
+ import "./chunk-ABPKUVA4.js";
95
+ import "./chunk-EKWX4WD3.js";
96
+ import "./chunk-ZGSJDWQU.js";
97
+ import "./chunk-YVHBNSME.js";
98
98
  import "./chunk-AWQWXSW4.js";
99
99
  import "./chunk-QYF5S6P6.js";
100
100
  import "./chunk-RZOXUSPC.js";
101
- import "./chunk-OLAWH5UQ.js";
101
+ import "./chunk-KPPJTH44.js";
102
102
  import "./chunk-J6JP25XU.js";
103
- import "./chunk-MN7MHUXQ.js";
104
- import "./chunk-ZQ6NZZTB.js";
103
+ import "./chunk-U5HPROLA.js";
104
+ import "./chunk-WME2OQST.js";
105
105
  import "./chunk-KXF5R4UN.js";
106
106
  import "./chunk-S26LC76R.js";
107
107
  import "./chunk-Z2XAOKHK.js";
@@ -1,14 +1,14 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  extractFactsFromTree
4
- } from "./chunk-OOU2WZZE.js";
4
+ } from "./chunk-WDBICWH3.js";
5
5
  import {
6
6
  findOwnerName
7
7
  } from "./chunk-5W3R6LFT.js";
8
8
  import {
9
9
  firstChildOfType,
10
10
  walk
11
- } from "./chunk-GAACZY6R.js";
11
+ } from "./chunk-L5JYIU47.js";
12
12
  import {
13
13
  isJstsFactFile
14
14
  } from "./chunk-RZOXUSPC.js";
@@ -0,0 +1,88 @@
1
+ import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
+ import {
3
+ _getWarmWordIndexCacheStateForTests,
4
+ _resetWarmWordIndexCacheForTests,
5
+ acquireWarmWordIndex,
6
+ analyzeFile,
7
+ summarizeWarningTiers
8
+ } from "./chunk-WGRJOXED.js";
9
+ import "./chunk-LBLBAFG3.js";
10
+ import "./chunk-MNJIXFX4.js";
11
+ import "./chunk-Y7F7IEE3.js";
12
+ import "./chunk-JJ2RRESP.js";
13
+ import "./chunk-EAOK7MIZ.js";
14
+ import "./chunk-4LM3VAZH.js";
15
+ import "./chunk-E7HJ56Y7.js";
16
+ import "./chunk-V63BC55Q.js";
17
+ import "./chunk-CPSR3AVL.js";
18
+ import "./chunk-ZE3KXHS7.js";
19
+ import "./chunk-RQS4QQSD.js";
20
+ import "./chunk-CB4WHS4H.js";
21
+ import "./chunk-N5WSK2K7.js";
22
+ import "./chunk-7E2563GA.js";
23
+ import "./chunk-MB6PXBUA.js";
24
+ import "./chunk-DQZFQSR5.js";
25
+ import "./chunk-3YY7IXIL.js";
26
+ import "./chunk-WDBICWH3.js";
27
+ import "./chunk-H7OR7DFZ.js";
28
+ import "./chunk-3MED75HT.js";
29
+ import "./chunk-FZKFVUEC.js";
30
+ import "./chunk-XT2HTCJ5.js";
31
+ import "./chunk-XIMYZ3JA.js";
32
+ import "./chunk-R5MOQM2H.js";
33
+ import "./chunk-24BILSZW.js";
34
+ import "./chunk-PR6PO3ES.js";
35
+ import "./chunk-RC2Z6K47.js";
36
+ import "./chunk-F5Z6URKM.js";
37
+ import "./chunk-5W3R6LFT.js";
38
+ import "./chunk-MPKRJBPK.js";
39
+ import "./chunk-DH5JPM3K.js";
40
+ import "./chunk-PKES3ISE.js";
41
+ import "./chunk-ZKXQKGWZ.js";
42
+ import "./chunk-L5JYIU47.js";
43
+ import "./chunk-Z54ZSOBZ.js";
44
+ import "./chunk-U6VN4NVL.js";
45
+ import "./chunk-TIQJPRDD.js";
46
+ import "./chunk-YISME6ON.js";
47
+ import "./chunk-6HWVI6MI.js";
48
+ import "./chunk-O4BJFESU.js";
49
+ import "./chunk-CKEQFGLT.js";
50
+ import "./chunk-HO6LWE2E.js";
51
+ import "./chunk-SNDXCFRS.js";
52
+ import "./chunk-QOE342SU.js";
53
+ import "./chunk-AWDSEDER.js";
54
+ import "./chunk-LLS45EWB.js";
55
+ import "./chunk-2BEMIWEW.js";
56
+ import "./chunk-IJYGIDF4.js";
57
+ import "./chunk-KDX35VXP.js";
58
+ import "./chunk-DPGEAHZT.js";
59
+ import "./chunk-NA7SEXHE.js";
60
+ import "./chunk-3F6BMY53.js";
61
+ import "./chunk-KW5JQPO5.js";
62
+ import "./chunk-PUZ3E2J4.js";
63
+ import "./chunk-ABPKUVA4.js";
64
+ import "./chunk-EKWX4WD3.js";
65
+ import "./chunk-ZGSJDWQU.js";
66
+ import "./chunk-YVHBNSME.js";
67
+ import "./chunk-AWQWXSW4.js";
68
+ import "./chunk-QYF5S6P6.js";
69
+ import "./chunk-RZOXUSPC.js";
70
+ import "./chunk-KPPJTH44.js";
71
+ import "./chunk-J6JP25XU.js";
72
+ import "./chunk-U5HPROLA.js";
73
+ import "./chunk-WME2OQST.js";
74
+ import "./chunk-KXF5R4UN.js";
75
+ import "./chunk-S26LC76R.js";
76
+ import "./chunk-Z2XAOKHK.js";
77
+ import "./chunk-VSFLRN5Y.js";
78
+ import "./chunk-LJDODBBZ.js";
79
+ import "./chunk-OSTKYB55.js";
80
+ import "./chunk-PQJFG24Z.js";
81
+ import "./chunk-NXL4FFQQ.js";
82
+ export {
83
+ _getWarmWordIndexCacheStateForTests,
84
+ _resetWarmWordIndexCacheForTests,
85
+ acquireWarmWordIndex,
86
+ analyzeFile,
87
+ summarizeWarningTiers
88
+ };
@@ -8,17 +8,17 @@ import {
8
8
  getDefaultStartupTools,
9
9
  resolveLanguageRootForFile,
10
10
  rootMarkersForFile
11
- } from "./chunk-NIU2IPC5.js";
12
- import "./chunk-BWYQUPOS.js";
13
- import "./chunk-2RLWJO5K.js";
14
- import "./chunk-VG5JS5SW.js";
15
- import "./chunk-Q3UZHW6N.js";
11
+ } from "./chunk-PUZ3E2J4.js";
12
+ import "./chunk-ABPKUVA4.js";
13
+ import "./chunk-EKWX4WD3.js";
14
+ import "./chunk-ZGSJDWQU.js";
15
+ import "./chunk-YVHBNSME.js";
16
16
  import "./chunk-QYF5S6P6.js";
17
17
  import "./chunk-RZOXUSPC.js";
18
- import "./chunk-OLAWH5UQ.js";
18
+ import "./chunk-KPPJTH44.js";
19
19
  import "./chunk-J6JP25XU.js";
20
- import "./chunk-MN7MHUXQ.js";
21
- import "./chunk-ZQ6NZZTB.js";
20
+ import "./chunk-U5HPROLA.js";
21
+ import "./chunk-WME2OQST.js";
22
22
  import "./chunk-KXF5R4UN.js";
23
23
  import "./chunk-S26LC76R.js";
24
24
  import "./chunk-Z2XAOKHK.js";
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  createToolchainAvailability
4
- } from "./chunk-EVDGNG4F.js";
4
+ } from "./chunk-CB4WHS4H.js";
5
5
  import {
6
6
  createSubsystemLogger
7
7
  } from "./chunk-KXF5R4UN.js";
@@ -9,18 +9,18 @@ import {
9
9
  resolveSeverityFloor,
10
10
  shouldScanTrivy,
11
11
  worktreeSkipDirs
12
- } from "./chunk-BHUWL2Y3.js";
12
+ } from "./chunk-E7HJ56Y7.js";
13
13
  import "./chunk-V63BC55Q.js";
14
- import "./chunk-AMXIUN2R.js";
15
- import "./chunk-3MYEA7QD.js";
16
- import "./chunk-ARD426WI.js";
17
- import "./chunk-5APMQ2IJ.js";
18
- import "./chunk-Q3UZHW6N.js";
14
+ import "./chunk-CPSR3AVL.js";
15
+ import "./chunk-ZE3KXHS7.js";
16
+ import "./chunk-3F6BMY53.js";
17
+ import "./chunk-KW5JQPO5.js";
18
+ import "./chunk-YVHBNSME.js";
19
19
  import "./chunk-AWQWXSW4.js";
20
- import "./chunk-OLAWH5UQ.js";
20
+ import "./chunk-KPPJTH44.js";
21
21
  import "./chunk-J6JP25XU.js";
22
- import "./chunk-MN7MHUXQ.js";
23
- import "./chunk-ZQ6NZZTB.js";
22
+ import "./chunk-U5HPROLA.js";
23
+ import "./chunk-WME2OQST.js";
24
24
  import "./chunk-KXF5R4UN.js";
25
25
  import "./chunk-S26LC76R.js";
26
26
  import "./chunk-Z2XAOKHK.js";
@@ -2,10 +2,11 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
2
2
  import {
3
3
  hashFileBytes,
4
4
  resolveRunnerPath
5
- } from "./chunk-NNKXDXXS.js";
5
+ } from "./chunk-LLS45EWB.js";
6
6
  import {
7
+ recordDegradationOnce,
7
8
  translateGuidanceToolNames
8
- } from "./chunk-ZQ6NZZTB.js";
9
+ } from "./chunk-WME2OQST.js";
9
10
  import {
10
11
  freshnessFromMtime
11
12
  } from "./chunk-S26LC76R.js";
@@ -87,7 +88,7 @@ function isWellFormed(value) {
87
88
  return false;
88
89
  const record = value;
89
90
  const revision = record.revision;
90
- return !!revision && typeof revision.sessionId === "string" && isFiniteNumber(revision.projectSeq) && isFiniteNumber(revision.turnIndex) && isFiniteNumber(revision.generation) && isFiniteNumber(revision.capturedAt) && Array.isArray(record.files) && record.files.length > 0 && record.files.every((file) => !!file && typeof file.path === "string" && (file.role === "source" || file.role === "test" || file.role === "affected") && isFiniteNumber(file.mtimeMs) && isFiniteNumber(file.size) && isCapturedHash(file.sha256));
91
+ return !!revision && typeof revision.sessionId === "string" && isFiniteNumber(revision.projectSeq) && isFiniteNumber(revision.turnIndex) && isFiniteNumber(revision.generation) && isFiniteNumber(revision.capturedAt) && Array.isArray(record.files) && record.files.length > 0 && record.files.every((file) => !!file && typeof file.path === "string" && (file.role === "source" || file.role === "test" || file.role === "affected" || file.role === "cited") && isFiniteNumber(file.mtimeMs) && isFiniteNumber(file.size) && isCapturedHash(file.sha256));
91
92
  }
92
93
  function validateAdvisoryProvenance(record, cwd, runtime) {
93
94
  if (!isWellFormed(record.provenance)) {
@@ -107,11 +108,14 @@ function validateAdvisoryProvenance(record, cwd, runtime) {
107
108
  if (provenance.revision.sessionId !== runtime.telemetrySessionId)
108
109
  reasons.push("session-mismatch");
109
110
  }
111
+ let subjectFiles = 0;
110
112
  let deletedFiles = 0;
111
113
  const changedPaths = /* @__PURE__ */ new Set();
112
114
  for (const captured of provenance.files) {
113
115
  const resolved = path.resolve(cwd, captured.path);
114
116
  const reasonsBefore = reasons.length;
117
+ if (captured.role !== "cited")
118
+ subjectFiles += 1;
115
119
  let stat;
116
120
  try {
117
121
  stat = fs.statSync(resolved);
@@ -154,7 +158,7 @@ function validateAdvisoryProvenance(record, cwd, runtime) {
154
158
  if (reasons.length > reasonsBefore)
155
159
  changedPaths.add(advisoryPathKey(resolved, cwd));
156
160
  }
157
- const allFilesDeleted = deletedFiles === provenance.files.length;
161
+ const allFilesDeleted = subjectFiles > 0 && provenance.truncated !== true && deletedFiles === provenance.files.length;
158
162
  if (unknown)
159
163
  return {
160
164
  status: "unknown",
@@ -437,10 +441,25 @@ ${content}` : `${AUTOMATION_FRAMING}${historicalPrefix(provenance)}
437
441
  ${content}`
438
442
  };
439
443
  }
440
- function peekTurnEndFindings(cacheManager, cwd, runtime, logDelivery = false) {
444
+ function addressedElsewhere(data, sessionId, address = sessionId) {
445
+ if (sessionId === void 0)
446
+ return void 0;
447
+ const addressee = data.deliverTo !== void 0 ? data.deliverTo === address ? void 0 : data.deliverTo : data.sessionId !== void 0 && data.sessionId !== sessionId ? data.sessionId : void 0;
448
+ if (addressee === void 0)
449
+ return void 0;
450
+ recordDegradationOnce({
451
+ kind: "turn-end-delivery-addressed-elsewhere",
452
+ subject: addressee,
453
+ reason: "a staged turn-end message is addressed to another session; it waits for that session's next request"
454
+ });
455
+ return addressee;
456
+ }
457
+ function peekTurnEndFindings(cacheManager, cwd, runtime, logDelivery = false, sessionId, address) {
441
458
  const findings = cacheManager.readCache("turn-end-findings", cwd);
442
459
  if (!findings?.data?.content || findings.data.consumed === true)
443
460
  return;
461
+ if (addressedElsewhere(findings.data, sessionId, address) !== void 0)
462
+ return;
444
463
  const validation = validateAdvisoryProvenance(findings.data, cwd, runtime);
445
464
  if (logDelivery)
446
465
  logProvenanceDecision(validation, findings.data.provenance, "turn-end", cwd);
@@ -452,10 +471,12 @@ function peekTurnEndFindings(cacheManager, cwd, runtime, logDelivery = false) {
452
471
  ]
453
472
  };
454
473
  }
455
- function consumeTurnEndFindings(cacheManager, cwd, runtime) {
474
+ function consumeTurnEndFindings(cacheManager, cwd, runtime, sessionId, address) {
456
475
  const findings = cacheManager.readCache("turn-end-findings", cwd);
457
476
  if (!findings?.data?.content || findings.data.consumed === true)
458
477
  return;
478
+ if (addressedElsewhere(findings.data, sessionId, address) !== void 0)
479
+ return;
459
480
  const validation = validateAdvisoryProvenance(findings.data, cwd, runtime);
460
481
  logProvenanceDecision(validation, findings.data.provenance, "turn-end", cwd);
461
482
  if (findings.data.hasBlockers === true && typeof findings.data.sessionId === "string") {
@@ -514,10 +535,12 @@ function consumeTestFindings(cacheManager, cwd, runtime) {
514
535
  retireTestFindings(cacheManager, cwd);
515
536
  return findings;
516
537
  }
517
- function acknowledgeTurnEndFindings(cacheManager, cwd) {
538
+ function acknowledgeTurnEndFindings(cacheManager, cwd, sessionId, address) {
518
539
  const findings = cacheManager.readCache("turn-end-findings", cwd);
519
540
  if (!findings?.data?.content || findings.data.consumed === true)
520
541
  return;
542
+ if (addressedElsewhere(findings.data, sessionId, address) !== void 0)
543
+ return;
521
544
  if (findings.data.hasBlockers === true && typeof findings.data.sessionId === "string") {
522
545
  cacheManager.writeCache("turn-end-findings", { ...findings.data, consumed: true }, cwd);
523
546
  } else {
@@ -1,15 +1,15 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  collectSourceFiles
4
- } from "./chunk-2RLWJO5K.js";
5
- import "./chunk-VG5JS5SW.js";
6
- import "./chunk-Q3UZHW6N.js";
4
+ } from "./chunk-EKWX4WD3.js";
5
+ import "./chunk-ZGSJDWQU.js";
6
+ import "./chunk-YVHBNSME.js";
7
7
  import "./chunk-QYF5S6P6.js";
8
8
  import "./chunk-RZOXUSPC.js";
9
- import "./chunk-OLAWH5UQ.js";
9
+ import "./chunk-KPPJTH44.js";
10
10
  import "./chunk-J6JP25XU.js";
11
- import "./chunk-MN7MHUXQ.js";
12
- import "./chunk-ZQ6NZZTB.js";
11
+ import "./chunk-U5HPROLA.js";
12
+ import "./chunk-WME2OQST.js";
13
13
  import "./chunk-KXF5R4UN.js";
14
14
  import "./chunk-S26LC76R.js";
15
15
  import "./chunk-Z2XAOKHK.js";