@davmash/bygone 0.10.1 → 0.11.1
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.
- package/CHANGELOG.md +25 -0
- package/README.md +64 -0
- package/bin/bygone.js +18 -1
- package/cli/commandSpec.js +22 -2
- package/cli/completions.js +30 -8
- package/cli/correspondence.js +71 -0
- package/cli/dependencies.js +62 -0
- package/cli/evidence.js +67 -0
- package/cli/present.js +61 -16
- package/cli/tour.js +18 -1
- package/cli/tourExport.js +1 -1
- package/completions/_bygone +15 -3
- package/completions/bygone +13 -5
- package/completions/bygone.fish +9 -0
- package/docs/change-tour-format.md +60 -6
- package/docs/correspondence.md +259 -0
- package/docs/dependencies.md +94 -0
- package/docs/evidence-review.md +163 -0
- package/docs/generating-change-tours.md +3 -0
- package/docs/present.md +3 -0
- package/docs/product-surface.md +2 -1
- package/docs/releasing.md +11 -0
- package/docs/vscode-integration.md +183 -0
- package/media/diff.worker.js +10 -9
- package/media/webview.css +1 -1
- package/media/webview.js +167 -167
- package/out/changeCorrespondence.js +739 -0
- package/out/changeTour.js +1366 -967
- package/out/dependencyGraph.js +213939 -0
- package/out/gitComparison.js +4 -0
- package/out/requirements.js +427 -0
- package/out/reviewDependencies.js +669 -0
- package/out/reviewWorkspace.js +1129 -0
- package/out/standalone-main.js +3382 -1341
- package/out/tourCoverage.js +1852 -1448
- package/package.json +2 -2
- package/schemas/change-tour-source.schema.json +48 -3
- package/web/export-runtime.json +6 -6
- package/web/index.html +13 -0
- package/web/presenter.css +81 -0
- package/web/web-host.js +23 -20
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# Try symbol correspondence evidence
|
|
2
|
+
|
|
3
|
+
This experimental integration connects externally produced symbol mappings to
|
|
4
|
+
Bygone's authoring context and presentation viewer. It does not run a matcher
|
|
5
|
+
or model automatically. RefactoringMiner and Java remain optional external
|
|
6
|
+
research tools; neither is a new Bygone runtime dependency.
|
|
7
|
+
|
|
8
|
+
## Generate evidence in this checkout
|
|
9
|
+
|
|
10
|
+
The development command inventories changed JS/TS, Python, Java, Go, Rust, C#, Ruby, PHP, C, Lua and
|
|
11
|
+
Mojo regular files from committed
|
|
12
|
+
Git blobs, runs the bounded analysis adapter and imports its result into the
|
|
13
|
+
validated viewer format. It uses the review merge base, just like `present`;
|
|
14
|
+
working-tree edits are excluded. No second branch or saved research report is
|
|
15
|
+
required.
|
|
16
|
+
|
|
17
|
+
Start without Java:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm run correspondence:analyze -- feature --base main \
|
|
21
|
+
--output /tmp/correspondence.json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
With no Java engine configuration, this inventories symbols and pairs only
|
|
25
|
+
unambiguous declarations with identical bytes. It records partial coverage:
|
|
26
|
+
edited or renamed declarations can remain unmatched, so unmatched does not
|
|
27
|
+
prove an addition or removal. Use `--exact-only` to choose this mode even when
|
|
28
|
+
Java engine environment variables are set.
|
|
29
|
+
|
|
30
|
+
To use the local Strand correspondence engine:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npm run correspondence:analyze -- feature --base main --engine bygone-strand \
|
|
34
|
+
--output /tmp/correspondence-strand.json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Bygone Strand is an original declaration matcher in the private
|
|
38
|
+
[`bygone-strand` workspace package](../packages/strand/README.md). It supports
|
|
39
|
+
JS/TS, Python, Java, Go, Rust, C#, Ruby, PHP, C, Lua and experimental Mojo. TypeScript and isolated
|
|
40
|
+
CPython parsers retain their existing behavior; the other languages share a
|
|
41
|
+
bounded Tree-sitter WASM frontend with pinned, locally shipped grammars. Scoped
|
|
42
|
+
declaration identities and syntax/token similarity infer edited continuations,
|
|
43
|
+
moves and renames. Strand requires no JVM, native addon or runtime downloads. The explicit selection ignores ambient Java configuration and
|
|
44
|
+
cannot be combined with `--exact-only` or Java flags. The default mode is
|
|
45
|
+
unchanged. See [the engine contract](../scripts/change-analysis/javascript-engine.md)
|
|
46
|
+
for evidence, ambiguity and resource limits.
|
|
47
|
+
|
|
48
|
+
This version produces one-to-one continuations. Extraction/inline detection,
|
|
49
|
+
binding resolution, editing history and behavior preservation are unassessed.
|
|
50
|
+
Python functions, async functions, classes, methods and nested declarations
|
|
51
|
+
support inferred edits and moves. Decorators and complete source diffs remain
|
|
52
|
+
visible. Python `.pyi` stubs retain inventory/exact matching only.
|
|
53
|
+
|
|
54
|
+
Go receiver and Rust impl/trait identities are conservative: receiver/type
|
|
55
|
+
renames are not inferred across owners. Mojo (`.mojo`/`.🔥`) uses a pinned
|
|
56
|
+
community grammar and remains experimental; legacy `fn` syntax is unsupported.
|
|
57
|
+
See the [package coverage and exclusions](../packages/strand/README.md) and
|
|
58
|
+
[grammar provenance](../packages/strand/src/grammars/README.md) for exact scope.
|
|
59
|
+
Parser errors/timeouts fail closed, and duplicate origins remain ambiguous.
|
|
60
|
+
`npm run test:strand` runs package and artifact integration checks.
|
|
61
|
+
|
|
62
|
+
For broader inference, build the pinned external engine following
|
|
63
|
+
[scripts/change-analysis/README.md](../scripts/change-analysis/README.md), then
|
|
64
|
+
supply its verified build digest and JDK explicitly:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
export MAPPING_JAVA=/absolute/path/to/jdk/bin/java
|
|
68
|
+
export MAPPING_JAR=/absolute/path/to/RefactoringMiner/build/libs/RM-fat.jar
|
|
69
|
+
export MAPPING_JAR_SHA256=<verified-build-sha256>
|
|
70
|
+
npm run correspondence:analyze -- feature --base main \
|
|
71
|
+
--output /tmp/correspondence.json
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Use `--repo /absolute/path/to/checkout` to analyze another repository without
|
|
75
|
+
copying its source into this one. `--java`, `--jar` and `--jar-sha256` override
|
|
76
|
+
the environment. Supply all three engine settings together; incomplete settings,
|
|
77
|
+
unavailable/incompatible toolchains and digest mismatches fail instead of silently
|
|
78
|
+
switching modes. The adapter needs a JDK 21+ with sibling `java` and `javac`
|
|
79
|
+
(verified with JDK 21). `--exact-only` cannot be combined with Java engine flags.
|
|
80
|
+
Python comparisons additionally use `--python` or
|
|
81
|
+
`MAPPING_PYTHON` (default `python3`), CPython 3.8+ with syntax support determined
|
|
82
|
+
by that interpreter. Named Python functions/classes/methods include decorators
|
|
83
|
+
and attached terminal comments; lambdas and variable bindings are excluded.
|
|
84
|
+
Python `.pyi` files have inventory/exact matching only and explicitly mark the
|
|
85
|
+
comparison partial because the pinned engine does not parse them. Validated
|
|
86
|
+
matches between analyzed implementation declarations can still be accepted.
|
|
87
|
+
|
|
88
|
+
The output must be a new file. Import creates it exclusively and refuses an
|
|
89
|
+
existing path, including the producer report itself and symlink or hardlink
|
|
90
|
+
aliases. It never overwrites existing bytes; choose another output path.
|
|
91
|
+
Artifacts contain source text;
|
|
92
|
+
keep private repositories' evidence outside this repository.
|
|
93
|
+
|
|
94
|
+
When presenting a tour, an authored `source.correspondence` path and an
|
|
95
|
+
explicit `--correspondence` path must identify the same actual file. Symlink
|
|
96
|
+
and hardlink aliases are accepted, but a separate copy with identical bytes is
|
|
97
|
+
still a different artifact and is rejected before the manifest output or server
|
|
98
|
+
is created.
|
|
99
|
+
|
|
100
|
+
Changed files bound the candidate universe: unchanged files, unsupported
|
|
101
|
+
languages, symlinks and submodules are excluded. The artifact records this
|
|
102
|
+
scope, the engine/bridge digests, parser version, limits and failure reason.
|
|
103
|
+
Engine/bridge digests are present only when that engine is configured.
|
|
104
|
+
Timeout, truncation or process failure produces explicitly partial evidence;
|
|
105
|
+
only independent exact declarations can survive. Invalid source encoding or
|
|
106
|
+
an input budget violation fails without writing an artifact. A comparison with
|
|
107
|
+
no supported source documents is explicitly unavailable.
|
|
108
|
+
|
|
109
|
+
Generation currently runs from a source checkout with development dependencies.
|
|
110
|
+
Java and RefactoringMiner are explicit external tools, not npm
|
|
111
|
+
`optionalDependencies`: npm does not install their toolchain, and Bygone does not
|
|
112
|
+
bundle or download them. Python is needed only to generate Python inventories.
|
|
113
|
+
Viewing/importing saved evidence and opening symbol tour stops needs neither
|
|
114
|
+
Java nor Python. This keeps engine size, native parser support and runtime updates
|
|
115
|
+
outside the viewer's installation path; optional does not imply reduced evidence
|
|
116
|
+
is equivalent to a complete engine result.
|
|
117
|
+
|
|
118
|
+
## Import an existing report
|
|
119
|
+
|
|
120
|
+
Normalized reports may contain one `analysis` or a `cases` array. Select a case
|
|
121
|
+
explicitly when importing a batch:
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
bygone correspondence import mappings.json feature --base main \
|
|
125
|
+
--case module-split --output /tmp/imported-correspondence.json
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The import resolves the selected review's merge-base/head to immutable commit
|
|
129
|
+
IDs. It checks every supplied document digest, symbol span and symbol digest
|
|
130
|
+
against those Git blobs, resolves endpoints uniquely, rejects conflicting or
|
|
131
|
+
ambiguous accepted continuations, and recomputes complete declaration diffs.
|
|
132
|
+
Producer-supplied quotations, line numbers, local diffs and equality flags are
|
|
133
|
+
not trusted. The artifact records analysis status, supplied document scope,
|
|
134
|
+
producer, unmatched counts, syntax exclusions and competing origins.
|
|
135
|
+
|
|
136
|
+
Only the selected producer case's supplied scope is checked. Source integrity
|
|
137
|
+
checks do not independently adjudicate the producer's symbol identities,
|
|
138
|
+
parsing, completeness or semantic claims. All mappings remain inferred and
|
|
139
|
+
behavior remains unassessed. Partial analysis suppresses engine-only mappings
|
|
140
|
+
unless the producer explicitly records complete search coverage for that pair.
|
|
141
|
+
The adapter permits this for analyzed implementations when only stubs are
|
|
142
|
+
skipped, or unique same-file/scope/name continuations when skipped implementation
|
|
143
|
+
files are unchanged. Skipped changed implementations, invalid parsing, engine
|
|
144
|
+
failure and truncation still prevent that claim. Import rejects complete pair
|
|
145
|
+
coverage from a failed or truncated engine; saved artifacts preserve the claim
|
|
146
|
+
and revalidate source bytes and endpoints. This remains producer-supplied search
|
|
147
|
+
evidence, not independently established lineage. Older partial artifacts without
|
|
148
|
+
pair coverage retain the exact-only guard. Independent exact-declaration
|
|
149
|
+
evidence can remain available. Extraction/inline
|
|
150
|
+
groups expose their endpoints in Analysis details; they are not accepted continuations.
|
|
151
|
+
|
|
152
|
+
Exact matching first checks unique same-file, same-scope, same-name bindings
|
|
153
|
+
with identical declaration bytes and binding context. Repeated constants in
|
|
154
|
+
different files can therefore retain their local continuations. Cross-scope
|
|
155
|
+
matching still considers all identical occurrences, including retained sources;
|
|
156
|
+
remaining competing origins are reported for variables as well as callables.
|
|
157
|
+
Local evidence does not override a conflicting engine candidate.
|
|
158
|
+
|
|
159
|
+
## Use the same artifact in both places
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
bygone tour context feature --base main \
|
|
163
|
+
--correspondence /tmp/correspondence.json --output /tmp/context.json
|
|
164
|
+
bygone present feature --base main --correspondence /tmp/correspondence.json
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
No authored `.bygone` file is required. In the viewer, select **Symbols**, filter
|
|
168
|
+
by name or path, and select a mapping to compare its complete old and new
|
|
169
|
+
source symbol slices, including edits within moved code. Variable slices can
|
|
170
|
+
exclude enclosing export/const/let syntax; inspect the complete file for that
|
|
171
|
+
context and for surrounding binding/import changes. The labels identify
|
|
172
|
+
both paths, source lines and revisions. Editor line numbers are relative to
|
|
173
|
+
the declaration slice. **Show file context** opens complete source and destination
|
|
174
|
+
files and highlights the declarations at their original lines, including moves
|
|
175
|
+
between files. **Return to symbol comparison** restores the declaration slices.
|
|
176
|
+
The **Files** rail also nests the same filtered symbol tree beneath each file.
|
|
177
|
+
Use the arrow on the right of a file (**Show Symbols** on hover) to reveal or
|
|
178
|
+
hide its symbols directly underneath. Each file starts folded and keeps its own
|
|
179
|
+
expansion state; selecting files, symbols, or tour stops does not change it.
|
|
180
|
+
Symbol names use green for after-only declarations, red for before-only declarations,
|
|
181
|
+
and amber for accepted mappings with edits, moves, renames, or reparenting. Ambiguous
|
|
182
|
+
origins and unchanged declarations stay neutral. One-sided colors describe the
|
|
183
|
+
inventory; they do not confirm additions or deletions.
|
|
184
|
+
Symbols and Files share selection; both endpoints of a move are highlighted.
|
|
185
|
+
Selecting a file opens its complete diff without advancing the tour.
|
|
186
|
+
Symbols groups declarations by file and nests classes, methods and functions
|
|
187
|
+
using their source ranges. Expand or collapse branches with the disclosure
|
|
188
|
+
buttons (also keyboard accessible). The default filter includes moved, renamed,
|
|
189
|
+
edited and unmatched declarations. **Include added or removed local symbols**
|
|
190
|
+
is checked by default; uncheck it to hide before-only and after-only declarations
|
|
191
|
+
without accepted matches, including ambiguous endpoints. These are not confirmed
|
|
192
|
+
additions or deletions. Enable **Include unchanged local symbols** to also show
|
|
193
|
+
unchanged matched declarations. Search retains ancestor paths and opens
|
|
194
|
+
matching branches. Ancestors retained only for context are dimmed.
|
|
195
|
+
Moved or reparented declarations appear at both locations; the old location is
|
|
196
|
+
labeled **Before location** and opens the same before/after comparison. Counts
|
|
197
|
+
include each accepted mapping once. **Before only**, **After only** and
|
|
198
|
+
**Ambiguous** entries have no accepted match; selecting one shows its available
|
|
199
|
+
source slice, without claiming a confirmed addition or deletion.
|
|
200
|
+
Open **Analysis details** for separate counts and expandable records for paths
|
|
201
|
+
outside analysis, syntax not inventoried, rejected engine containers, unmatched
|
|
202
|
+
symbols and competing origins, other relationships, and analysis problems.
|
|
203
|
+
Records retain reported reasons, revision sides and source locations. Links open
|
|
204
|
+
complete file context or inventoried symbols, including unchanged declarations;
|
|
205
|
+
symbol links clear search and enable both include options.
|
|
206
|
+
Ambiguous groups link every competing endpoint without picking an origin.
|
|
207
|
+
Invalid producer ranges retain paths without trusted offsets. A missing candidate
|
|
208
|
+
is distinguished from a rejected candidate; when the producer gives no explanation,
|
|
209
|
+
the viewer says so. Categories overlap, use explicit units and are not a coverage
|
|
210
|
+
percentage. Unchanged files outside a changed-file search are described as a scope
|
|
211
|
+
limit, not enumerated as missing symbols. Older artifacts retain their summaries
|
|
212
|
+
and show **Detailed diagnostics unavailable** rather than zero diagnostic counts.
|
|
213
|
+
The status always names the artifact's pinned base/head, even when exploring
|
|
214
|
+
other history comparisons. An uploaded tour does not inherit this evidence.
|
|
215
|
+
|
|
216
|
+
Both consumers revalidate the artifact against their selected comparison.
|
|
217
|
+
Advancing a branch does not silently reuse old evidence: a different head or
|
|
218
|
+
merge base requires a new import. Context's ordinary patches, counts and limits
|
|
219
|
+
are unchanged; correspondence is a separate optional field with its own
|
|
220
|
+
budgets (16 MiB artifact, 128 documents per side, 1 MiB per Git blob, 8 MiB total
|
|
221
|
+
source and 8 MiB total symbol text). Nested symbols overlap, so their diffs
|
|
222
|
+
must not be summed as coverage or subtracted from changed-line accounting.
|
|
223
|
+
For a declaration diff exceeding the comparison effort budget, its entire old
|
|
224
|
+
and new slices are retained as removal/addition rather than omitting content.
|
|
225
|
+
|
|
226
|
+
## Use symbols in authored tours
|
|
227
|
+
|
|
228
|
+
Version 6 walkthrough steps can select an accepted relation or one unmatched
|
|
229
|
+
symbol from a source's `correspondence` artifact. The compiler pins declaration
|
|
230
|
+
text and full file context into each stop, preserving one-sided ambiguous
|
|
231
|
+
endpoints. See [Symbol-focused stops](change-tour-format.md#symbol-focused-stops)
|
|
232
|
+
for the source contract, validation, coverage, and offline behavior.
|
|
233
|
+
|
|
234
|
+
## Run this checkout's real example
|
|
235
|
+
|
|
236
|
+
With the explicit engine environment above:
|
|
237
|
+
|
|
238
|
+
```sh
|
|
239
|
+
npm run correspondence:analyze -- 726796b1fe --base '726796b1fe^' \
|
|
240
|
+
--output /tmp/bygone-correspondence.json
|
|
241
|
+
BYGONE_FORCE_BUNDLED=1 node bin/bygone.js present 726796b1fe \
|
|
242
|
+
--base '726796b1fe^' --correspondence /tmp/bygone-correspondence.json
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Search for `validateChangeTourDetails`. The declaration comparison retains the
|
|
246
|
+
removed `validateAssessment(...)` call, removed context parameter and changed
|
|
247
|
+
allowed-key list. The artifact includes six moved functions and other inferred
|
|
248
|
+
continuations. `BYGONE_FORCE_BUNDLED=1` selects the newly built checkout instead
|
|
249
|
+
of an older installed desktop application.
|
|
250
|
+
|
|
251
|
+
`npm run test:correspondence` runs the source/CLI/server checks and an Electron
|
|
252
|
+
browser smoke using a portable fixture taken from that real module split.
|
|
253
|
+
This slice does not construct intermediate refactoring stages, hide raw edits,
|
|
254
|
+
add model annotations, or establish reviewer benefit.
|
|
255
|
+
|
|
256
|
+
`npm run test:correspondence:engine` uses the same explicit engine environment.
|
|
257
|
+
It runs the adapter tests, Git snapshot tests, real JVM timeout/truncation/output
|
|
258
|
+
failure checks, Python ranges/moves/renames and fresh module-split generation accepted by the viewer's
|
|
259
|
+
consumer. Large archived reports and evaluations stay on the research branch.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Dependency evidence
|
|
2
|
+
|
|
3
|
+
The Node CLI (npm installation or `node bin/bygone.js` in a source checkout)
|
|
4
|
+
compares JS/TS module dependencies at the merge base and head of a committed
|
|
5
|
+
review range:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
bygone dependencies HEAD --base main
|
|
9
|
+
bygone dependencies HEAD --base main --json
|
|
10
|
+
bygone dependencies HEAD --base main --output dependencies.json
|
|
11
|
+
bygone tour context HEAD --base main --dependencies --output context.json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The text report lists added/removed module edges and direct, unchanged consumers
|
|
15
|
+
of changed files. Each site includes a `bygone://` link to its committed source.
|
|
16
|
+
JSON includes both bounded snapshot graphs, potential initialization calls and
|
|
17
|
+
constructors, diagnostics, and exact evidence coordinates. Ordinary tour context
|
|
18
|
+
generation is unchanged. The desktop and VS Code interfaces do not yet have a
|
|
19
|
+
graph view; these commands use the Node CLI rather than the desktop launcher.
|
|
20
|
+
|
|
21
|
+
## Reading an edge
|
|
22
|
+
|
|
23
|
+
Relationship, phase, and loading are separate fields. Static evidence can describe
|
|
24
|
+
initialization or later invocation; it is not a runtime trace.
|
|
25
|
+
|
|
26
|
+
- `import`, `reexport`, `require`, and `dynamic-import` describe syntax.
|
|
27
|
+
- `type` marks explicitly type-only dependencies and dependencies in declaration files. `module-init` marks syntax
|
|
28
|
+
evaluated while a module initializes; a lazy-loaded module can initialize much
|
|
29
|
+
later than process startup. `invocation` marks function/callback bodies.
|
|
30
|
+
`unknown` retains sites where the extractor cannot assign a phase safely.
|
|
31
|
+
- `eager` distinguishes ordinary imports/require from `deferred` dynamic imports and namespace `import defer` declarations. Deferred namespace evaluation has `unknown` phase because namespace use determines when evaluation occurs.
|
|
32
|
+
A dynamic import at top level is still labeled `module-init`. A `require` inside
|
|
33
|
+
a function is `invocation` even though the require operation itself is eager.
|
|
34
|
+
- `resolution: resolved` means the TypeScript resolver found a committed target
|
|
35
|
+
under the selected compiler options. It does not prove execution, runtime loader
|
|
36
|
+
equivalence, or the identity of a shadowable `require` binding.
|
|
37
|
+
- `unresolved`, `computed`, and `invalid-config` preserve unknown targets. Builtins,
|
|
38
|
+
external packages, and computed specifiers commonly remain unresolved.
|
|
39
|
+
|
|
40
|
+
Potential initialization calls are syntax sites, not inferred function-call
|
|
41
|
+
edges. Registration calls can appear here; their callback bodies are classified
|
|
42
|
+
separately. IIFE bodies are conservatively labeled invocation with a diagnostic.
|
|
43
|
+
Instance field initializers have unknown timing; static fields and class static
|
|
44
|
+
blocks inherit the enclosing evaluation phase. Conditions are not evaluated.
|
|
45
|
+
Non-explicit type import elision and transpiler-specific emission are not modeled.
|
|
46
|
+
|
|
47
|
+
## Historical resolution and coverage
|
|
48
|
+
|
|
49
|
+
Both graphs are built from Git tree/blob objects at immutable OIDs. Dirty files,
|
|
50
|
+
installed packages, symlink targets, compiler plugins and target code are never
|
|
51
|
+
read or executed for resolution. The nearest committed `tsconfig.json` (or
|
|
52
|
+
`jsconfig.json`) supplies compiler options, including relative `extends`, `baseUrl`
|
|
53
|
+
and `paths`. Missing/invalid config is diagnosed. Without a config, analysis uses
|
|
54
|
+
TypeScript's Node-style resolution with JavaScript enabled. The report records
|
|
55
|
+
the analyzer's TypeScript version; it need not match the target project's compiler.
|
|
56
|
+
The dependency analyzer uses an isolated TypeScript 5.9.3 parser/resolver (without changing Strand or the extension compiler), including `bundler` resolution and modern syntax such as `using`. Package-based config extension and bundler runtime plugins remain outside scope. Malformed package metadata produces partial coverage; resolution that needs that metadata is `invalid-config`, without a fallback target.
|
|
57
|
+
Project references do not provide symbol binding or build output reconstruction.
|
|
58
|
+
|
|
59
|
+
Limits apply per snapshot: 2,000 source/config files, 1 MiB per file, 16 MiB total
|
|
60
|
+
input and 20,000 dependency/initialization records. Source-ancestor package.json, tsconfig.json and jsconfig.json files, plus their relative config inheritance closure, share the input budget and are read first. Directory imports can load other required package metadata on demand through the same bounds. Unrelated JSON, package files and lockfiles do not consume this budget. Relative inheritance supports transitive and array parents within the same bounds. Only UTF-8 text is parsed.
|
|
61
|
+
The dependency analysis budget is 30 seconds, including standalone Git range
|
|
62
|
+
discovery and both snapshots. It is checked between parsing/resolution operations;
|
|
63
|
+
it is not a hard interrupt inside the parser. Tour context reuses its pinned range,
|
|
64
|
+
and its ordinary context generation is outside this budget. Git tree enumeration is
|
|
65
|
+
bounded to 16 MiB. Up to 1,000 diagnostics per snapshot are retained with an omitted
|
|
66
|
+
count. Programmatic callers may lower these limits.
|
|
67
|
+
|
|
68
|
+
`coverage` reports supported source candidates, indexed/omitted files, unresolved
|
|
69
|
+
edges and whether indexing completed within the supported scope. Configuration,
|
|
70
|
+
parser and scope diagnostics matter even when an endpoint was found. A resolved
|
|
71
|
+
target can itself be outside the indexed subset. Partial graphs produce provisional
|
|
72
|
+
deltas and consumer lists; missing edges never establish independence. Submodules,
|
|
73
|
+
non-JS/TS languages and installed `node_modules` are outside scope.
|
|
74
|
+
|
|
75
|
+
The delta compares module endpoints, relationship, phase and loading, aligning
|
|
76
|
+
Git-detected renames. Source spelling/location and repeated occurrences alone do
|
|
77
|
+
not constitute new module edges. When a module edge changes, all matching source
|
|
78
|
+
sites appear in the delta. Alias/config retargeting can change dependencies of an
|
|
79
|
+
unchanged file. Consumer lists are one hop and include type-only edges, with phases
|
|
80
|
+
retained so callers can filter them. They are not a transitive impact analysis.
|
|
81
|
+
|
|
82
|
+
Every source reference contains a commit OID, Git blob OID, repository-relative
|
|
83
|
+
path, UTF-16 half-open range, one-based line/column, and SHA-256 of the selected
|
|
84
|
+
UTF-8 text. Links are local to the repository that generated the report. Equal
|
|
85
|
+
base/head revisions and paths outside the deep-link grammar retain coordinates
|
|
86
|
+
without a link. No source content is embedded in the dependency report itself.
|
|
87
|
+
|
|
88
|
+
Runtime trace ingestion, resolved symbol/call graphs and visual graph layout are
|
|
89
|
+
later slices. No workload is run to generate this evidence.
|
|
90
|
+
|
|
91
|
+
The [validation corpus and measured results](../scripts/dependency-benchmark/README.md)
|
|
92
|
+
cover labeled module edges, source evidence, bounded scale and pinned public
|
|
93
|
+
repositories. The historical baseline documents compatibility and metadata gaps; the follow-up validation records their fixes. Complete indexing is not proof that runtime
|
|
94
|
+
loading is valid.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Pinned evidence and live repair
|
|
2
|
+
|
|
3
|
+
Evidence Review connects a saved requirement to exact Git source, then offers an
|
|
4
|
+
explicit handoff to Bygone's existing synchronized VS Code editor. The saved
|
|
5
|
+
review stays pinned while you edit. This is an inspection aid: a valid source
|
|
6
|
+
reference, a passing recorded command, and a human inspection are separate facts.
|
|
7
|
+
None is an automatic approval or proof that a requirement is fulfilled.
|
|
8
|
+
|
|
9
|
+
## Load and inspect
|
|
10
|
+
|
|
11
|
+
Use **Bygone: Open Evidence Review** in a trusted local VS Code workspace and
|
|
12
|
+
choose a version 2 review JSON file. The selected workspace binds the artifact to
|
|
13
|
+
a local repository. Bygone requires both immutable commits to exist there and
|
|
14
|
+
validates referenced text against Git; the repository label is descriptive, not
|
|
15
|
+
an authenticated remote identity. Dirty files are excluded from the review.
|
|
16
|
+
|
|
17
|
+
The view shows quoted source material, questions, valid and broken links,
|
|
18
|
+
recorded executions, inspection notes, analysis limits, and changed files with
|
|
19
|
+
no valid evidence link. A linked file can still contain unexplained changes.
|
|
20
|
+
Use **Pinned source** for the exact range or **Pinned file diff** for context.
|
|
21
|
+
Both are read-only. Deleted/missing counterparts remain historical evidence.
|
|
22
|
+
|
|
23
|
+
The CLI exposes the same inspection and refresh policy:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
bygone -C /path/to/repo evidence inspect review.json
|
|
27
|
+
bygone -C /path/to/repo evidence import exported-review.json --output imported.json
|
|
28
|
+
bygone -C /path/to/repo evidence inspect imported.json --dependencies dependencies.json
|
|
29
|
+
bygone -C /path/to/repo evidence tour imported.json --output evidence.bygone
|
|
30
|
+
bygone -C /path/to/repo present --tour evidence.bygone
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Import validates source references and removes carried inspection decisions.
|
|
34
|
+
The versioned review model is in `src/requirements.ts`. Old exports with only
|
|
35
|
+
branch names or timestamps cannot be imported as pinned evidence. All output
|
|
36
|
+
commands require new files; existing artifacts are never overwritten.
|
|
37
|
+
|
|
38
|
+
## Edit, return, refresh
|
|
39
|
+
|
|
40
|
+
**Edit working counterpart** maps the exact cited snapshot/range to the current
|
|
41
|
+
working document. Whole-declaration mapping uses existing Strand JS/TS analysis.
|
|
42
|
+
Identical file content can retain an exact range. Ambiguous mappings, partial
|
|
43
|
+
ranges in changed files, and unsupported syntax fall back to full-file context;
|
|
44
|
+
no match is inferred from a name or reused offset. Git-reported renames preserve before/after paths. An absent working counterpart
|
|
45
|
+
opens read-only historical source instead. **Edit working file** explicitly opens full-file
|
|
46
|
+
context without symbol mapping.
|
|
47
|
+
|
|
48
|
+
The left side is the cited immutable snapshot; the right side is the live VS Code
|
|
49
|
+
`TextDocument`. The existing version/range-guarded bridge owns edits, dirty state,
|
|
50
|
+
save, undo, and recovery. Staging remains VS Code Git's responsibility. Returning
|
|
51
|
+
with the **Return to Evidence Review** toolbar button or command restores the pinned review panel and
|
|
52
|
+
its scroll position while that panel remains open; a closed panel is recreated.
|
|
53
|
+
Editing or saving does not change its claims. Following's
|
|
54
|
+
**Resume** deliberately leaves the review snapshot and returns to ordinary HEAD
|
|
55
|
+
following.
|
|
56
|
+
|
|
57
|
+
After committing a repair, choose **Refresh to committed revision**. Supply a
|
|
58
|
+
validated correspondence artifact for old-head → new-head to relocate changed
|
|
59
|
+
whole declarations, or refresh unchanged files only and leave changed evidence
|
|
60
|
+
unresolved. The new head must descend from the captured head; rewritten or unrelated history
|
|
61
|
+
requires a separately imported review. The original PR baseline is preserved. A head delta is not a new
|
|
62
|
+
whole-PR comparison. New comparisons require renewed inspection, even if cited
|
|
63
|
+
bytes match; notes remain visible.
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
bygone evidence refresh review.json --head <new-commit> \
|
|
67
|
+
--correspondence old-head-to-new-head.json --output refreshed.json
|
|
68
|
+
bygone evidence refresh review.json --head <same-commit> \
|
|
69
|
+
--requirements edited-review.json --output reworded.json
|
|
70
|
+
bygone evidence tour refreshed.json --output refreshed.bygone
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The requirement-only option takes the edited requirement array from a complete
|
|
74
|
+
review document with the same repository/base/head identity; its IDs must remain compatible with existing links/questions.
|
|
75
|
+
Regenerate a current tour after repairs. Keep deliberately historical tours and
|
|
76
|
+
reviews pinned. **Record inspection in new artifact** saves a fingerprint and
|
|
77
|
+
note, not approval, and never overwrites the source artifact.
|
|
78
|
+
|
|
79
|
+
## Producer boundary
|
|
80
|
+
|
|
81
|
+
Bygone consumes the version 2 review shape from compatible producers, including
|
|
82
|
+
the PR Reviewer bridge. Producers must capture immutable comparison identities
|
|
83
|
+
and retain the original source quotations in their saved snapshots. A later push
|
|
84
|
+
must not relabel historical evidence.
|
|
85
|
+
|
|
86
|
+
Unmapped anchors, producer-reported unexplained hunks, overflow counts, and
|
|
87
|
+
unavailable discussion capture are listed as limitations; producer assessments
|
|
88
|
+
remain rationale. Unexplained-change line labels are retained as unvalidated
|
|
89
|
+
producer context, not source anchors. File-level linked coverage does not
|
|
90
|
+
establish coverage of every hunk. Checklists, discussions, publication state,
|
|
91
|
+
and approvals remain in the producing system; they are not Bygone decisions or
|
|
92
|
+
execution records. Exports without immutable capture cannot be imported as pinned
|
|
93
|
+
evidence.
|
|
94
|
+
|
|
95
|
+
The producer receipt digest identifies the initial exported projection. Its hashing recipe is recorded in the analysis scope: replace that receipt digest with 64 zeroes, serialize sorted keys as compact UTF-8 JSON without ASCII escaping, then SHA-256. It is not authentication or a checksum of later review edits; refresh retains historical provenance.
|
|
96
|
+
|
|
97
|
+
## Dependency-guided inspection and limits
|
|
98
|
+
|
|
99
|
+
Load an existing `bygone dependencies` report for exactly the review's merge-base
|
|
100
|
+
and head. Navigation includes reported added/removed module edges, direct
|
|
101
|
+
unchanged consumers, and initialization sites, with phase, loading, and resolution labels.
|
|
102
|
+
Source ranges, content digests, blob IDs, and comparison identities are checked
|
|
103
|
+
against Git. Producer coverage, omissions, diagnostics, and assumptions remain
|
|
104
|
+
visible. Imported summaries must match all inventory identity fields. Validation
|
|
105
|
+
checks referenced file counts and bytes against reported coverage and declared
|
|
106
|
+
limits (up to 16 MiB per snapshot, 32 MiB across both), and applies the declared time budget to local validation/Git reads.
|
|
107
|
+
Records provide only a lower bound on producer input: files without sites and
|
|
108
|
+
resolver-only inputs are not reconstructible from the report, nor is the original
|
|
109
|
+
producer's elapsed time independently verifiable.
|
|
110
|
+
|
|
111
|
+
This is syntactic module evidence, not a semantic call graph or runtime trace.
|
|
112
|
+
Changing an imported binding within the same module can leave graph edges
|
|
113
|
+
unchanged. New TypeScript syntax/options, malformed package metadata, and input
|
|
114
|
+
budgets can limit resolution. No graph change is never proof of behavioral safety.
|
|
115
|
+
|
|
116
|
+
Hosts bound JSON/source sizes and refuse oversized or non-text evidence rather
|
|
117
|
+
than silently reporting it as complete. Live editing retains its existing
|
|
118
|
+
128 KiB/5,000-line limit. Remote workspaces and untrusted workspaces are not
|
|
119
|
+
supported by this first host. The web viewer explains when Symbols is unavailable
|
|
120
|
+
because no validated correspondence artifact was supplied.
|
|
121
|
+
|
|
122
|
+
Keep issue decisions, CI, approval, and merge in their existing systems. A review
|
|
123
|
+
can use ordinary diffs and equivalent source links; a tour is optional. Evidence
|
|
124
|
+
artifacts should be retained only when they help inspect, reproduce, or hand off
|
|
125
|
+
the review, not as a mandatory second task ledger.
|
|
126
|
+
|
|
127
|
+
## Verification record
|
|
128
|
+
|
|
129
|
+
Implementation was based on `dda37567` after the dependency validation work
|
|
130
|
+
landed. Local verification on 2026-10-26 covered:
|
|
131
|
+
|
|
132
|
+
- Bygone's legacy runner and all 503 Node tests, TypeScript checking, ESLint,
|
|
133
|
+
bundle budgets, VSIX packaging, and npm packaging/dry-run. The staged npm CLI
|
|
134
|
+
also inspected a real pinned review successfully.
|
|
135
|
+
- Producer interoperability: exported review → Bygone import → validated tour.
|
|
136
|
+
- A fresh Linux ARM64 Lima checkout: 9 evidence handoff checks, 29 SCM checks,
|
|
137
|
+
and 16 original following checks on each of VS Code 1.74.0 and 1.143.1. These
|
|
138
|
+
exercise the real Extension Host and Monaco, including dirty text, shared undo,
|
|
139
|
+
intervening native edits, slice boundaries, index preservation, rename/missing
|
|
140
|
+
counterparts, explicit refresh, and unsupported-symbol fallback.
|
|
141
|
+
The evidence suite was repeated after the workflow fixes; the SCM/following
|
|
142
|
+
results cover the unchanged editing bridges from earlier in this implementation.
|
|
143
|
+
The final evidence rerun includes switching or closing the review while a real
|
|
144
|
+
symbol worker is pending; a stale result cannot replace the comparison or its
|
|
145
|
+
return context. Import rejects inconsistent file and unresolved-edge counters.
|
|
146
|
+
|
|
147
|
+
To rerun the handoff suite after compiling:
|
|
148
|
+
|
|
149
|
+
```sh
|
|
150
|
+
BYGONE_EVIDENCE_TEST=1 BYGONE_VSCODE_EXECUTABLE=/path/to/code \
|
|
151
|
+
xvfb-run -a node scripts/test-following.mjs
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
A retrospective fixture for merged SCM repair `c7219ed0` validated one quoted
|
|
155
|
+
requirement and two exact implementation/test links, generated a pinned tour,
|
|
156
|
+
and left three other changed files explicitly uncovered. It recorded no test
|
|
157
|
+
execution or approval merely because the linked test exists. The same source
|
|
158
|
+
was inspected through an ordinary diff. The evidence view retains requirement,
|
|
159
|
+
range, and freshness context; no human review-time or comprehension advantage
|
|
160
|
+
was measured. This is a functional comparison, not a usability study.
|
|
161
|
+
|
|
162
|
+
Not verified here: live producer API/model runs, manual browser visual QA, Windows/macOS Extension Hosts, remote workspaces, or a human paired
|
|
163
|
+
review trial. No release was published by these checks.
|
|
@@ -176,3 +176,6 @@ matters. A new scene or file does not inherently mean a new comparison. Close
|
|
|
176
176
|
by connecting the mechanism back to the promised behavior and stating material
|
|
177
177
|
limits, rather than reciting the chapter titles. Include any remaining checks without adding
|
|
178
178
|
fake code stops. See [the format](change-tour-format.md) for the fields.
|
|
179
|
+
|
|
180
|
+
For experimental revision-pinned symbol evidence in authoring context and the
|
|
181
|
+
viewer, see [symbol correspondence](correspondence.md).
|
package/docs/present.md
CHANGED
|
@@ -289,3 +289,6 @@ revisions or constructed stages; a chapter or scene boundary does not itself
|
|
|
289
289
|
mean the comparison changed. Intro, chapter, and Conclusion passages fill the
|
|
290
290
|
reading area. Exploring Files restores the prose/code split, and “Return to
|
|
291
291
|
passage” restores the full-height passage.
|
|
292
|
+
|
|
293
|
+
For experimental revision-pinned symbol evidence in authoring context and the
|
|
294
|
+
viewer, see [symbol correspondence](correspondence.md).
|
package/docs/product-surface.md
CHANGED
|
@@ -139,7 +139,8 @@ VS Code's native Search rather than another bundled ripgrep process.
|
|
|
139
139
|
| --- | --- | --- |
|
|
140
140
|
| `bygone`, paths, `--diff`, `--history`, `--git-diff`, `--read-only`, `review` | Launch Explore sessions | Core launcher; desktop owns writes; `--read-only` is a persisted capability ceiling for that launch |
|
|
141
141
|
| `present` and `present --tour` | Launch Present sessions | Core, read-only presentation |
|
|
142
|
-
| `tour context` | Produce a bounded provider-neutral change dossier |
|
|
142
|
+
| `tour context` | Produce a bounded provider-neutral change dossier; optional `--dependencies` adds static JS/TS evidence | Node CLI authoring support, read-only |
|
|
143
|
+
| `dependencies` | Compare committed module edges and identify unchanged consumers, with source navigation links | Experimental Node CLI analysis, read-only except explicit output files; no runtime execution |
|
|
143
144
|
| `tour validate`, `compile`, `schema`, and coverage options | Validate exact evidence and build repository-bound manifests | Advanced authoring, read-only except explicit output files |
|
|
144
145
|
| `completion` | Generate shell completions from the shared command specification | Supporting tooling |
|
|
145
146
|
|
package/docs/releasing.md
CHANGED
|
@@ -82,6 +82,17 @@ Related packaging commands:
|
|
|
82
82
|
|
|
83
83
|
Before publishing, verify:
|
|
84
84
|
|
|
85
|
+
### Packaging dependency override
|
|
86
|
+
|
|
87
|
+
The development toolchain scopes an `@azure/msal-node` 7.1.0 override to
|
|
88
|
+
`@azure/identity`, which is used by `@vscode/vsce`. The version requested by
|
|
89
|
+
Azure Identity is affected by
|
|
90
|
+
[GHSA-xcx6-jx8p-x3h5](https://github.com/advisories/GHSA-xcx6-jx8p-x3h5).
|
|
91
|
+
Remove the override once Azure Identity requests a patched version. Local
|
|
92
|
+
credential construction and VSIX packaging are checked; interactive Azure
|
|
93
|
+
authentication still requires a separate authenticated check before publishing
|
|
94
|
+
through that flow. This dependency is not bundled into the shipped extension.
|
|
95
|
+
|
|
85
96
|
## Accounts You Need
|
|
86
97
|
|
|
87
98
|
You need accounts on three services:
|