mustflow 2.116.1 → 2.116.3
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/package.json +1 -1
- package/templates/default/i18n.toml +72 -6
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +37 -11
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/SKILL.md +477 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-diagnostics-abi-linker-checklist.md +778 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-generators-properties-checklist.md +501 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-test-strategy-differential-checklist.md +498 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/debug-symbol-symbolication-checklist.md +412 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/ir-design-ssa-pass-pipeline-checklist.md +759 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/miscompile-reduction-ir-checklist.md +434 -0
- package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/SKILL.md +55 -36
- package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/references/path-containment-handle-checklist.md +251 -0
- package/templates/default/locales/en/.mustflow/skills/file-upload-security-review/SKILL.md +133 -32
- package/templates/default/locales/en/.mustflow/skills/file-upload-security-review/references/file-upload-parser-ssrf-resource-checklist.md +306 -0
- package/templates/default/locales/en/.mustflow/skills/formal-verification-review/SKILL.md +310 -0
- package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-concurrency-model-checking-smt-checklist.md +457 -0
- package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-contracts-modeling-checklist.md +434 -0
- package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-memory-bounds-ci-checklist.md +509 -0
- package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/SKILL.md +439 -0
- package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/references/fuzz-harness-campaign-checklist.md +379 -0
- package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/references/fuzz-oracle-triage-ci-checklist.md +307 -0
- package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/SKILL.md +48 -28
- package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/references/operation-ordering-stale-write-checklist.md +259 -0
- package/templates/default/locales/en/.mustflow/skills/input-boundary-validation-review/SKILL.md +329 -0
- package/templates/default/locales/en/.mustflow/skills/input-boundary-validation-review/references/input-boundary-security-checklist.md +319 -0
- package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/SKILL.md +306 -0
- package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/references/input-session-state-checklist.md +298 -0
- package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/references/remote-input-transport-interaction-checklist.md +328 -0
- package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/SKILL.md +353 -0
- package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-diagnostics-recovery-checklist.md +267 -0
- package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-execution-closure-performance-checklist.md +428 -0
- package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-gc-verification-checklist.md +457 -0
- package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-semantics-runtime-checklist.md +391 -0
- package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/SKILL.md +294 -0
- package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/references/modal-loop-reentrancy-checklist.md +290 -0
- package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/references/nested-modal-state-lifetime-checklist.md +297 -0
- package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/SKILL.md +252 -0
- package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/dns-network-resolution-checklist.md +394 -0
- package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/language-symbol-resolution-checklist.md +282 -0
- package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/module-package-loader-resolution-checklist.md +352 -0
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/SKILL.md +103 -17
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/cst-ast-lowering-checklist.md +260 -0
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/lexer-tokenization-checklist.md +397 -0
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/tree-serialization-compatibility-checklist.md +164 -0
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/tree-traversal-rewrite-checklist.md +209 -0
- package/templates/default/locales/en/.mustflow/skills/race-condition-review/SKILL.md +68 -11
- package/templates/default/locales/en/.mustflow/skills/race-condition-review/references/race-reproduction-memory-model-checklist.md +268 -0
- package/templates/default/locales/en/.mustflow/skills/routes.toml +151 -0
- package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/SKILL.md +343 -0
- package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/references/session-auth-stream-resume-checklist.md +413 -0
- package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/references/session-handoff-protocol-checklist.md +485 -0
- package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/SKILL.md +267 -0
- package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/references/admission-decision-recovery-checklist.md +308 -0
- package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/references/two-phase-transition-checklist.md +229 -0
- package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/SKILL.md +300 -0
- package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/references/ui-affinity-event-loop-checklist.md +277 -0
- package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/references/ui-dispatch-lifecycle-checklist.md +292 -0
- package/templates/default/manifest.toml +115 -1
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# Module, Package, and Loader Resolution Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when an import, package coordinate, module name, class name, build dependency, or
|
|
4
|
+
repository label resolves to a different artifact, variant, feature set, instance, or cache entry.
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
1. [Resolution capsule](#resolution-capsule)
|
|
9
|
+
2. [Coordinate, artifact, and instance identity](#coordinate-artifact-and-instance-identity)
|
|
10
|
+
3. [Search roots and mappings](#search-roots-and-mappings)
|
|
11
|
+
4. [Conditions, variants, and features](#conditions-variants-and-features)
|
|
12
|
+
5. [Loader and cache identity](#loader-and-cache-identity)
|
|
13
|
+
6. [Node and package exports](#node-and-package-exports)
|
|
14
|
+
7. [Peer-context and strict-layout packages](#peer-context-and-strict-layout-packages)
|
|
15
|
+
8. [Python import paths and namespace packages](#python-import-paths-and-namespace-packages)
|
|
16
|
+
9. [JVM class loaders](#jvm-class-loaders)
|
|
17
|
+
10. [Go module ownership](#go-module-ownership)
|
|
18
|
+
11. [Cargo feature resolution](#cargo-feature-resolution)
|
|
19
|
+
12. [Maven conflict mediation](#maven-conflict-mediation)
|
|
20
|
+
13. [Gradle variant selection](#gradle-variant-selection)
|
|
21
|
+
14. [CMake package discovery](#cmake-package-discovery)
|
|
22
|
+
15. [Bazel repository mapping](#bazel-repository-mapping)
|
|
23
|
+
16. [Build, test, deploy, and release graph parity](#build-test-deploy-and-release-graph-parity)
|
|
24
|
+
17. [Evidence matrix](#evidence-matrix)
|
|
25
|
+
18. [Failure matrix](#failure-matrix)
|
|
26
|
+
19. [Invariants](#invariants)
|
|
27
|
+
20. [Skill handoffs](#skill-handoffs)
|
|
28
|
+
|
|
29
|
+
## Resolution capsule
|
|
30
|
+
|
|
31
|
+
Capture:
|
|
32
|
+
|
|
33
|
+
- requester file, package, target, class loader, build target, or plugin host;
|
|
34
|
+
- exact import, package coordinate, module path, label, or requested capability;
|
|
35
|
+
- working directory, workspace root, project root, and configuration generation;
|
|
36
|
+
- runtime, package manager, build tool, resolver mode, and supported version contract;
|
|
37
|
+
- active conditions, platform, architecture, language mode, feature set, attributes, and profiles;
|
|
38
|
+
- ordered search roots, repositories, aliases, replacements, mappings, and fallbacks;
|
|
39
|
+
- lockfile, workspace, cache, and install-layout identity;
|
|
40
|
+
- selected package version, artifact digest, physical path or realpath, variant, and runtime instance;
|
|
41
|
+
- rejected candidates and conflict, exclusion, compatibility, or precedence reasons.
|
|
42
|
+
|
|
43
|
+
Capture the failing environment before reinstalling, pruning, cleaning, regenerating, or deleting
|
|
44
|
+
build directories. A clean build that succeeds can prove stale state existed, but not which cache or
|
|
45
|
+
mapping was stale.
|
|
46
|
+
|
|
47
|
+
## Coordinate, artifact, and instance identity
|
|
48
|
+
|
|
49
|
+
Keep these layers separate:
|
|
50
|
+
|
|
51
|
+
| Layer | Example identity |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| Source coordinate | Import string, package name and range, module path, class name, repository label. |
|
|
54
|
+
| Resolved graph node | Selected version, replacement, capability provider, feature or variant context. |
|
|
55
|
+
| Physical artifact | Canonical path, archive, class directory, native binary, digest, or generated output. |
|
|
56
|
+
| Loader instance | Module cache entry, class loader plus class name, plugin realm, isolated context. |
|
|
57
|
+
| Behavioral instance | Singleton state, registry, constructor identity, enabled API, native dependency. |
|
|
58
|
+
|
|
59
|
+
A lockfile can pin a graph node while two peer contexts produce separate physical paths and runtime
|
|
60
|
+
instances. Equal source bytes do not make classes defined by separate loaders assignable, and equal
|
|
61
|
+
package versions do not guarantee equal feature or variant surfaces.
|
|
62
|
+
|
|
63
|
+
## Search roots and mappings
|
|
64
|
+
|
|
65
|
+
Record all roots and transformations:
|
|
66
|
+
|
|
67
|
+
- caller-relative ancestor search;
|
|
68
|
+
- workspace package links and virtual stores;
|
|
69
|
+
- source aliases and compiler paths;
|
|
70
|
+
- package export and import maps;
|
|
71
|
+
- runtime, bundler, test, editor, and type-checker aliases;
|
|
72
|
+
- environment-injected paths;
|
|
73
|
+
- module replacements and workspace overlays;
|
|
74
|
+
- repository mirrors, proxies, and local caches;
|
|
75
|
+
- generated package indexes and build-system repository mappings;
|
|
76
|
+
- canonical path, symlink, hard-link, and realpath behavior.
|
|
77
|
+
|
|
78
|
+
Do not treat a compile-time alias as a declared package dependency or assume the runtime, test runner,
|
|
79
|
+
deployer, and editor implement the same mapping. Preserve the resolver and origin at every consumer.
|
|
80
|
+
|
|
81
|
+
## Conditions, variants, and features
|
|
82
|
+
|
|
83
|
+
Many resolvers select more than a version. Record:
|
|
84
|
+
|
|
85
|
+
- import versus require or equivalent module mode;
|
|
86
|
+
- runtime, browser, development, production, platform, and custom export conditions;
|
|
87
|
+
- API versus runtime usage;
|
|
88
|
+
- language or bytecode target;
|
|
89
|
+
- operating system, architecture, native ABI, and linkage mode;
|
|
90
|
+
- requested and unified features;
|
|
91
|
+
- peer host version and optional peer presence;
|
|
92
|
+
- producer and consumer attributes;
|
|
93
|
+
- capability conflicts and disambiguation;
|
|
94
|
+
- default feature, fallback, and compatibility rules.
|
|
95
|
+
|
|
96
|
+
Assert the selected entry point or variant, not only the package coordinate. Different conditions can
|
|
97
|
+
load separate files and initialize state twice inside one process.
|
|
98
|
+
|
|
99
|
+
## Loader and cache identity
|
|
100
|
+
|
|
101
|
+
For every loaded module or class, capture:
|
|
102
|
+
|
|
103
|
+
- resolved canonical origin;
|
|
104
|
+
- loader, realm, isolate, or module graph identity;
|
|
105
|
+
- cache key and whether symlinks are canonicalized;
|
|
106
|
+
- package and peer context;
|
|
107
|
+
- initialization state and singleton registry identity;
|
|
108
|
+
- parent-first, child-first, delegated, or isolated lookup policy;
|
|
109
|
+
- hot reload, watch-mode, plugin unload, and stale-code behavior;
|
|
110
|
+
- native-library and allocator ownership where applicable.
|
|
111
|
+
|
|
112
|
+
Do not use a module's display name as its runtime identity. Test constructor, type, singleton, and
|
|
113
|
+
registry behavior across the suspected duplicate instances.
|
|
114
|
+
|
|
115
|
+
## Node and package exports
|
|
116
|
+
|
|
117
|
+
For Node-like resolution, distinguish:
|
|
118
|
+
|
|
119
|
+
- CommonJS caller-relative ancestor search;
|
|
120
|
+
- ESM URL and package resolution;
|
|
121
|
+
- package `exports` and `imports` maps;
|
|
122
|
+
- active condition order and selected target;
|
|
123
|
+
- import versus require entry points;
|
|
124
|
+
- deep import availability before and after an export map;
|
|
125
|
+
- symlink and realpath policy;
|
|
126
|
+
- cache identity for CommonJS and ESM graphs;
|
|
127
|
+
- dual-package state and constructor identity.
|
|
128
|
+
|
|
129
|
+
For each failing caller, record the resolved URL or canonical filename. Two callers can resolve the
|
|
130
|
+
same bare package spelling from different ancestor roots. A package can also expose different files
|
|
131
|
+
to import and require, producing two initialization and singleton domains.
|
|
132
|
+
|
|
133
|
+
Treat a new export map as a public boundary change: previously reachable internal paths may become
|
|
134
|
+
blocked even when package version and lockfile are unchanged.
|
|
135
|
+
|
|
136
|
+
## Peer-context and strict-layout packages
|
|
137
|
+
|
|
138
|
+
For content-addressed or strict package layouts, record:
|
|
139
|
+
|
|
140
|
+
- declaring package and whether the dependency is direct;
|
|
141
|
+
- selected version and integrity;
|
|
142
|
+
- peer dependency names and resolved peer versions;
|
|
143
|
+
- virtual-store or peer-context suffix;
|
|
144
|
+
- symlink chain and final realpath;
|
|
145
|
+
- hoisting or public-hoist policy;
|
|
146
|
+
- package-manager mode and workspace links;
|
|
147
|
+
- runtime module instance and singleton expectation.
|
|
148
|
+
|
|
149
|
+
Do not infer one instance from equal version text or shared content bytes. Different peer sets can
|
|
150
|
+
require distinct graph nodes and runtime instances. A dependency visible only through accidental
|
|
151
|
+
hoisting is undeclared even if one installation layout makes it importable.
|
|
152
|
+
|
|
153
|
+
## Python import paths and namespace packages
|
|
154
|
+
|
|
155
|
+
Record:
|
|
156
|
+
|
|
157
|
+
- interpreter executable and environment;
|
|
158
|
+
- entry mode and first path entry;
|
|
159
|
+
- working directory, script directory, environment-injected paths, and site initialization;
|
|
160
|
+
- ordered import path and importer hooks;
|
|
161
|
+
- module specification, origin, loader, cached path, and package search locations;
|
|
162
|
+
- local files shadowing standard or installed packages;
|
|
163
|
+
- namespace-package portions contributed by every path root;
|
|
164
|
+
- module cache identity and reload behavior.
|
|
165
|
+
|
|
166
|
+
A package without one file origin may be a valid namespace package composed from several locations.
|
|
167
|
+
Inspect its full search path and each submodule origin. Adding another distribution can add or shadow
|
|
168
|
+
a portion without replacing the parent package object.
|
|
169
|
+
|
|
170
|
+
Compare an isolated interpreter environment only as a controlled delta. It can reveal ambient path
|
|
171
|
+
injection without proving which original path entry selected the wrong module.
|
|
172
|
+
|
|
173
|
+
## JVM class loaders
|
|
174
|
+
|
|
175
|
+
Treat runtime type identity as:
|
|
176
|
+
|
|
177
|
+
`binary class name + defining class loader`
|
|
178
|
+
|
|
179
|
+
Capture:
|
|
180
|
+
|
|
181
|
+
- initiating and defining loader;
|
|
182
|
+
- parent and delegation order;
|
|
183
|
+
- thread context loader;
|
|
184
|
+
- module layer or plugin realm;
|
|
185
|
+
- code source, artifact digest, and protection domain;
|
|
186
|
+
- duplicate resources and service-provider configuration;
|
|
187
|
+
- class-path versus module-path placement;
|
|
188
|
+
- unload and reload generation.
|
|
189
|
+
|
|
190
|
+
For a cast or service-discovery failure, log both sides' defining loaders and origins. Equal class
|
|
191
|
+
names and bytecode are insufficient when loaders differ.
|
|
192
|
+
|
|
193
|
+
## Go module ownership
|
|
194
|
+
|
|
195
|
+
Record:
|
|
196
|
+
|
|
197
|
+
- import path including semantic import version suffix;
|
|
198
|
+
- owning module selected by longest matching module-path prefix;
|
|
199
|
+
- module version and graph selection;
|
|
200
|
+
- workspace modules;
|
|
201
|
+
- replacement and exclusion directives;
|
|
202
|
+
- vendor mode, proxy, checksum, and local-cache origin;
|
|
203
|
+
- package directory and build tags;
|
|
204
|
+
- test-only or tool dependency context.
|
|
205
|
+
|
|
206
|
+
Different major module paths are different import identities and can coexist. Do not describe module
|
|
207
|
+
selection as simply choosing the newest repository tag. Preserve the selected owner module and every
|
|
208
|
+
replacement or workspace overlay.
|
|
209
|
+
|
|
210
|
+
## Cargo feature resolution
|
|
211
|
+
|
|
212
|
+
For a crate instance, record:
|
|
213
|
+
|
|
214
|
+
- package name, source, and version;
|
|
215
|
+
- target triple and dependency kind;
|
|
216
|
+
- default and explicitly requested features;
|
|
217
|
+
- every reverse dependency enabling a feature;
|
|
218
|
+
- resolver policy and contexts where unification is reduced;
|
|
219
|
+
- optional dependencies activated by features;
|
|
220
|
+
- native links or build-script consequences;
|
|
221
|
+
- final enabled feature set and compiled artifact identity.
|
|
222
|
+
|
|
223
|
+
Features are not necessarily private switches for each edge. A transitive requester can change the
|
|
224
|
+
API, implementation, or native dependency set seen by another consumer through unification. Test the
|
|
225
|
+
minimal graph that proves which edge enabled the disputed feature.
|
|
226
|
+
|
|
227
|
+
## Maven conflict mediation
|
|
228
|
+
|
|
229
|
+
Record:
|
|
230
|
+
|
|
231
|
+
- complete dependency paths to each candidate version;
|
|
232
|
+
- path depth and declaration order at equal depth;
|
|
233
|
+
- dependency-management constraints;
|
|
234
|
+
- direct declarations, exclusions, scopes, optional edges, and imported management;
|
|
235
|
+
- selected artifact, omitted candidates, and mediation reason;
|
|
236
|
+
- plugin, test, and runtime class paths separately.
|
|
237
|
+
|
|
238
|
+
Do not assume the numerically highest version wins. A managed version controls an encountered
|
|
239
|
+
dependency but does not by itself add a dependency edge. Preserve the exact path and mediation reason.
|
|
240
|
+
|
|
241
|
+
## Gradle variant selection
|
|
242
|
+
|
|
243
|
+
Record:
|
|
244
|
+
|
|
245
|
+
- requested component and configuration;
|
|
246
|
+
- consumer attributes;
|
|
247
|
+
- producer variants and attributes;
|
|
248
|
+
- compatibility and disambiguation rules;
|
|
249
|
+
- selected variant and artifact set;
|
|
250
|
+
- capabilities and conflicting providers;
|
|
251
|
+
- component metadata rules, constraints, substitutions, and platforms;
|
|
252
|
+
- build-cache key and target environment.
|
|
253
|
+
|
|
254
|
+
Variant names are labels, not the selection proof. Compare the attribute set and reason each
|
|
255
|
+
candidate was compatible, rejected, or disambiguated.
|
|
256
|
+
|
|
257
|
+
## CMake package discovery
|
|
258
|
+
|
|
259
|
+
Record:
|
|
260
|
+
|
|
261
|
+
- module-search versus package-config mode;
|
|
262
|
+
- requested package name, version, components, and exactness;
|
|
263
|
+
- module path, prefixes, roots, registries, toolchain files, and environment hints;
|
|
264
|
+
- cached directory and previous failed or successful discoveries;
|
|
265
|
+
- selected finder or package-config file and version file;
|
|
266
|
+
- imported targets, configuration mapping, architecture, and transitive requirements;
|
|
267
|
+
- build-directory generation and platform.
|
|
268
|
+
|
|
269
|
+
A project-provided finder and a package-provided config file can expose different targets and
|
|
270
|
+
semantics for the same package name. Make the intended mode explicit when the contract requires one.
|
|
271
|
+
Capture cache state before using a new build directory as the control.
|
|
272
|
+
|
|
273
|
+
## Bazel repository mapping
|
|
274
|
+
|
|
275
|
+
Record:
|
|
276
|
+
|
|
277
|
+
- apparent repository name written by the current module;
|
|
278
|
+
- module or extension that owns the requester;
|
|
279
|
+
- repository mapping visible from that requester;
|
|
280
|
+
- canonical repository identity used internally;
|
|
281
|
+
- selected module version, override, extension output, and lock state;
|
|
282
|
+
- generated labels and whether they leaked an internal canonical name;
|
|
283
|
+
- target configuration, toolchain, and platform.
|
|
284
|
+
|
|
285
|
+
Repository names are contextual. Code and generated labels should use names intentionally visible to
|
|
286
|
+
their caller rather than persisting implementation-specific canonical names as public API.
|
|
287
|
+
|
|
288
|
+
## Build, test, deploy, and release graph parity
|
|
289
|
+
|
|
290
|
+
Compare resolver products across:
|
|
291
|
+
|
|
292
|
+
- editor and language server;
|
|
293
|
+
- compiler or type checker;
|
|
294
|
+
- bundler and test runner;
|
|
295
|
+
- development runtime;
|
|
296
|
+
- package, prune, or deployment builder;
|
|
297
|
+
- container or serverless image;
|
|
298
|
+
- release package and external consumer.
|
|
299
|
+
|
|
300
|
+
For each lane, record graph node, physical artifact, conditions or variant, cache key, and runtime
|
|
301
|
+
instance. A source build can pass while a pruned deploy omits an undeclared dependency, a test alias
|
|
302
|
+
bypasses package exports, or an external consumer selects another entry point.
|
|
303
|
+
|
|
304
|
+
## Evidence matrix
|
|
305
|
+
|
|
306
|
+
| Evidence | Proves | Does not prove |
|
|
307
|
+
| --- | --- | --- |
|
|
308
|
+
| Lockfile entry | A graph decision recorded for a package-manager state. | Physical path, active variant, loader instance, or deployed inclusion. |
|
|
309
|
+
| Dependency tree | Selected and omitted graph edges under one resolver context. | Runtime cache identity or another build lane. |
|
|
310
|
+
| Resolved canonical path | Physical artifact selected for one requester. | Equal feature set, loader identity, or singleton state. |
|
|
311
|
+
| Package metadata | Declared exports, peers, features, or variants. | Which conditions and consumer attributes were active. |
|
|
312
|
+
| Loader identity | Runtime namespace owning a class or module. | Correct package declaration or build graph. |
|
|
313
|
+
| Build-cache hit | A key matched cached output. | That every resolver input was included in the key. |
|
|
314
|
+
| Successful local import | One environment found an artifact. | Declared dependency, external consumer, prune, deploy, or release correctness. |
|
|
315
|
+
|
|
316
|
+
## Failure matrix
|
|
317
|
+
|
|
318
|
+
| Symptom | Evidence to require |
|
|
319
|
+
| --- | --- |
|
|
320
|
+
| Same package version creates two singletons. | Caller-specific origins, peer or condition contexts, realpaths, cache keys, and loader instances. |
|
|
321
|
+
| Import works in one directory only. | Requester-relative search roots, package declaration, hoisting, aliases, and selected origin. |
|
|
322
|
+
| Import and require disagree. | Active export conditions, selected entry points, graph and cache identities. |
|
|
323
|
+
| Local file masks an installed Python package. | Entry mode, ordered import path, module spec, origin, and isolated control. |
|
|
324
|
+
| Class cannot cast to the same named class. | Defining loaders, code sources, artifacts, and plugin generations. |
|
|
325
|
+
| A Cargo feature appears unexpectedly. | Reverse enabling edges, resolver context, final feature set, and artifact identity. |
|
|
326
|
+
| Build tool selects the wrong native artifact. | Consumer attributes, compatible variants, disambiguation, platform, and cache key. |
|
|
327
|
+
| Package discovery works only after a clean build. | Finder mode, search roots, cached package directory, old artifact, and configuration generation. |
|
|
328
|
+
| Generated Bazel label fails in another module. | Requester repository mapping, apparent name, leaked canonical name, and override state. |
|
|
329
|
+
| Tests pass but deployed artifact fails to import. | Test aliases, declared dependency, prune graph, packaged files, and runtime resolution. |
|
|
330
|
+
|
|
331
|
+
## Invariants
|
|
332
|
+
|
|
333
|
+
- Every coordinate claim names the requester and resolver context.
|
|
334
|
+
- Every selected dependency records version, variant or feature context, physical artifact, and origin.
|
|
335
|
+
- Every module or class identity includes its loader or cache domain.
|
|
336
|
+
- Every package-path claim distinguishes symlink path, canonical path, and package graph node.
|
|
337
|
+
- Every cache claim names inputs that form the cache key and the configuration generation.
|
|
338
|
+
- Every build-lane claim is bounded to the actual compiler, test, deploy, or release resolver used.
|
|
339
|
+
- Every duplicate-instance claim proves distinct runtime identities, not merely duplicate files.
|
|
340
|
+
|
|
341
|
+
## Skill handoffs
|
|
342
|
+
|
|
343
|
+
- Use `name-resolution-integrity-review` for coordinate-to-artifact-to-instance tracing.
|
|
344
|
+
- Use `dependency-reality-check` for dependency declaration, role, package exports, peer, deploy, and
|
|
345
|
+
release contract changes after localization.
|
|
346
|
+
- Use `dependency-upgrade-review` when selected versions or tool behavior change through an upgrade.
|
|
347
|
+
- Use `module-boundary-review` for allowed import direction and public package boundaries.
|
|
348
|
+
- Use `compiler-engineering-review` or `interpreter-engineering-review` for language module semantics
|
|
349
|
+
and compiled or cached resolver implementation.
|
|
350
|
+
- Use the matching language or build-system skill for source and configuration edits.
|
|
351
|
+
- Use `cache-integrity-review` when build or module cache keys and invalidation own the defect.
|
|
352
|
+
- Use `provenance-license-gate` and supply-chain skills when a different artifact source is selected.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
mustflow_doc: skill.parser-engineering-review
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 4
|
|
6
6
|
lifecycle: mustflow-owned
|
|
7
7
|
authority: procedure
|
|
8
8
|
name: parser-engineering-review
|
|
9
|
-
description: Apply this skill when a lexer, tokenizer, grammar, parser, CST, AST lowering pass, operator table, error recovery path, incremental parser, Unicode source-position layer, large-input path, parser resource limit, or parser fuzz harness is created, changed, reviewed, debugged, or reported.
|
|
9
|
+
description: Apply this skill when a lexer, tokenizer, grammar, parser, lossless CST, surface AST, AST-to-HIR lowering pass, tree visitor, transformer or transactional rewriter, persistent node identity, tree serialization or compatibility format, tree schema or verifier, trivia or syntax-origin model, operator table, error recovery path, incremental parser, Unicode source-position layer, large-input path, parser resource limit, or parser fuzz harness is created, changed, reviewed, debugged, or reported.
|
|
10
10
|
metadata:
|
|
11
11
|
mustflow_schema: "1"
|
|
12
12
|
mustflow_kind: procedure
|
|
@@ -38,8 +38,11 @@ fail within bounded CPU and memory on malformed or hostile input.
|
|
|
38
38
|
## Use When
|
|
39
39
|
|
|
40
40
|
- Lexer rules, modes, trivia, raw or cooked token values, or token spans change.
|
|
41
|
-
- Grammar, parser algorithm, CST shape, AST
|
|
42
|
-
|
|
41
|
+
- Grammar, parser algorithm, CST shape, surface AST schema, AST or HIR lowering, origin mapping,
|
|
42
|
+
trivia attachment, tree identity or verification, operator precedence or associativity, formatter
|
|
43
|
+
grouping, or semantic handoff changes.
|
|
44
|
+
- Visitor order, immutable transformation, rewrite conflict or termination policy, snapshot handles,
|
|
45
|
+
analysis invalidation, tree serialization, schema evolution, or bounded decoding changes.
|
|
43
46
|
- Invalid-input diagnostics, repair, synchronization, delimiter handling, or IDE recovery changes.
|
|
44
47
|
- Incremental parsing, source buffers, changed ranges, cancellation, Unicode positions, streaming
|
|
45
48
|
decode, large-file behavior, parser limits, or fuzzing needs implementation or review.
|
|
@@ -57,6 +60,8 @@ fail within bounded CPU and memory on malformed or hostile input.
|
|
|
57
60
|
- The task only changes upload, archive, transport, or container limits outside the parser pipeline;
|
|
58
61
|
use the applicable security or boundary skill.
|
|
59
62
|
- The task is cosmetic formatting with no parse-print, grouping, or source-preservation contract.
|
|
63
|
+
- The task only changes a general fuzz target, corpus, mutator, instrumentation, campaign, or
|
|
64
|
+
artifact-triage boundary without changing parser semantics; use `fuzz-harness-review`.
|
|
60
65
|
|
|
61
66
|
<!-- mustflow-section: required-inputs -->
|
|
62
67
|
## Required Inputs
|
|
@@ -65,6 +70,14 @@ fail within bounded CPU and memory on malformed or hostile input.
|
|
|
65
70
|
input size.
|
|
66
71
|
- Lexer rules and modes, grammar or parser code, tree schemas, lowering and formatting paths, and
|
|
67
72
|
current valid and invalid fixtures.
|
|
73
|
+
- The tree-layer contract: information preserved or discarded by tokens, CST, surface AST, HIR or
|
|
74
|
+
core trees, side tables, and every source-aware or semantic consumer of those layers.
|
|
75
|
+
- Traversal and persistence contracts when applicable: visit order and edge model, transform result
|
|
76
|
+
algebra, edit conflict and commit rules, rewrite termination, handle generations, preserved
|
|
77
|
+
analyses, artifact lifetime, wire schema, compatibility window, decode budgets, and verifier layers.
|
|
78
|
+
- The token contract when lexing is in scope: canonical span unit, raw and cooked representations,
|
|
79
|
+
diagnostics and trivia ownership, longest-match and tie policy, keyword policy, literal grammar,
|
|
80
|
+
Unicode profile, lexical goals, streaming outcomes, and incremental restart state.
|
|
68
81
|
- The parser role: batch compiler, editor service, protocol boundary, configuration loader, query
|
|
69
82
|
engine, or another explicit consumer.
|
|
70
83
|
- Existing resource limits, incremental snapshot model, diagnostics contract, fuzz harness, and
|
|
@@ -130,21 +143,69 @@ does not bound earlier transformations.
|
|
|
130
143
|
|
|
131
144
|
### 4. Enforce lexer progress and fidelity
|
|
132
145
|
|
|
146
|
+
When lexing or tokenization is in scope, read
|
|
147
|
+
[lexer-tokenization-checklist.md](references/lexer-tokenization-checklist.md) before accepting the
|
|
148
|
+
token contract, implementation, or test matrix.
|
|
149
|
+
|
|
133
150
|
- Require every lexer step to reach EOF, consume at least one input unit, or emit a bounded
|
|
134
151
|
synthetic token while changing state. An error token must cover real input unless it represents a
|
|
135
152
|
declared zero-width insertion.
|
|
136
|
-
-
|
|
137
|
-
|
|
153
|
+
- Distinguish a committed source EOF from a temporary buffer boundary. Return `NeedMoreInput` only
|
|
154
|
+
while a current candidate can still become valid and the source EOF is unknown; once EOF is
|
|
155
|
+
committed, emit one final token, one bounded malformed or unterminated token, or the terminal EOF
|
|
156
|
+
outcome. Never repeat a zero-width error or EOF token.
|
|
157
|
+
- Implement longest match around the last accepting checkpoint, not the first accepting state.
|
|
158
|
+
Compare candidate extent before an explicit, stable tie priority; keep comparison end separate
|
|
159
|
+
from token end when lookahead or trailing context participates. Reject unresolved equal-length,
|
|
160
|
+
equal-priority overlaps instead of letting source declaration order become an accidental contract.
|
|
161
|
+
- Scan a complete identifier before exact hard-keyword reclassification. Keep contextual keywords
|
|
162
|
+
as identifiers or parser-consumed hints, and define whether escapes, normalization, or case
|
|
163
|
+
folding affect the semantic spelling used for lookup.
|
|
164
|
+
- Treat follower restrictions, such as a forbidden identifier start after a number or a dot that
|
|
165
|
+
belongs to a range or member access, as lexical boundary predicates. Preserve one bounded
|
|
166
|
+
malformed token when the language contract requires one diagnostic instead of a misleading valid
|
|
167
|
+
prefix followed by unrelated tokens.
|
|
168
|
+
- Restrict candidate rules by the current lexical mode or parser-supplied lexical goal. Use stack
|
|
169
|
+
frames for nested interpolation, raw-string delimiters, comments, and embedded expressions; a
|
|
170
|
+
single inside-string boolean is not sufficient.
|
|
138
171
|
- Make mode stacks and restart checkpoints serializable when incremental lexing is supported.
|
|
139
|
-
|
|
140
|
-
|
|
172
|
+
Relex until both token content and restart state converge, not for a fixed line or character
|
|
173
|
+
radius.
|
|
174
|
+
- Preserve token raw spans, raw spelling or source slices, cooked values or invalid states, trivia,
|
|
175
|
+
newline effects, invalid bytes or characters, token-local diagnostics, and recovery provenance
|
|
176
|
+
needed by a lossless CST and precise diagnostics.
|
|
177
|
+
- Keep diagnosis separate from rendering. Record a stable code and arguments plus the opener or
|
|
178
|
+
first-fault span, related termination span, consumed recovery span, origin span, snapshot, and
|
|
179
|
+
mode. Coalesce cascades by contamination region, and validate automatic fix-its by applying them
|
|
180
|
+
to a temporary snapshot and relexing until token and outgoing-state convergence.
|
|
141
181
|
|
|
142
182
|
### 5. Separate CST, AST, and semantic meaning
|
|
143
183
|
|
|
184
|
+
When CST shape, AST schema, lowering, syntax origins, tree identity, trivia attachment, or tree
|
|
185
|
+
verification is in scope, read
|
|
186
|
+
[cst-ast-lowering-checklist.md](references/cst-ast-lowering-checklist.md) before accepting the layer
|
|
187
|
+
contract or test matrix.
|
|
188
|
+
|
|
189
|
+
When visitor order, transformation, rewriting, structural sharing, persistent syntax identity,
|
|
190
|
+
snapshot handles, or analysis preservation is in scope, read
|
|
191
|
+
[tree-traversal-rewrite-checklist.md](references/tree-traversal-rewrite-checklist.md).
|
|
192
|
+
|
|
193
|
+
When a tree or analysis snapshot is serialized, cached, exchanged across versions, migrated,
|
|
194
|
+
decoded from untrusted bytes, or fuzzed as a format, read
|
|
195
|
+
[tree-serialization-compatibility-checklist.md](references/tree-serialization-compatibility-checklist.md).
|
|
196
|
+
|
|
144
197
|
- Let a lossless CST account for every source byte exactly once through tokens, trivia, skipped
|
|
145
|
-
input, and
|
|
146
|
-
|
|
147
|
-
|
|
198
|
+
input, and unexpected syntax. Represent missing tokens as zero-width evidence at a precise
|
|
199
|
+
insertion point without printing them as user-written text.
|
|
200
|
+
- Write a CST-to-AST loss ledger. For every removed wrapper, delimiter, spelling, grouping, recovery
|
|
201
|
+
marker, or source relation, name the lowering stage and the consumer contract that permits loss.
|
|
202
|
+
- Keep a surface AST distinct from HIR or core trees when source tools need user-written constructs
|
|
203
|
+
but semantic consumers need normalized forms. Preserve evaluation count, order, scope, receiver
|
|
204
|
+
identity, errors, and origins through desugaring.
|
|
205
|
+
- Distinguish absent, missing, synthetic, empty, elided, and erroneous states. Never turn malformed
|
|
206
|
+
syntax into an ordinary executable name, literal, operand, or delimiter merely to complete a node.
|
|
207
|
+
- Keep node identity, source span, structural hash, syntax reference, and phase side-table generation
|
|
208
|
+
separate. Run a phase-specific verifier after parsing and every material lowering step.
|
|
148
209
|
- Keep name resolution, type rules, assignment validity, and other semantic rejection outside the
|
|
149
210
|
syntax layer unless the grammar contract explicitly owns them.
|
|
150
211
|
|
|
@@ -201,6 +262,9 @@ Bound speculative work and memoization under the same parser budget.
|
|
|
201
262
|
- Store enough restart state for lexical mode, delimiter or indentation context, and parser state.
|
|
202
263
|
Reparse until both token content and restart state converge; a fixed character radius is not a
|
|
203
264
|
correctness boundary.
|
|
265
|
+
- Treat checkpoint serialization as a continuation contract: restoring a checkpoint and lexing the
|
|
266
|
+
suffix must match uninterrupted lexing. Use hashes only to reject unequal blocks quickly; verify
|
|
267
|
+
canonical token fields and complete outgoing state before declaring convergence.
|
|
204
268
|
- Prefer relative subtree positions and aggregate lengths so a prefix edit does not rewrite every
|
|
205
269
|
following absolute offset. Use rope, piece-tree, or equivalent chunked storage instead of forcing
|
|
206
270
|
a full source string.
|
|
@@ -215,9 +279,13 @@ Bound speculative work and memoization under the same parser budget.
|
|
|
215
279
|
long those chunks remain valid.
|
|
216
280
|
- Prefer compact nodes, arenas, tree buffers, and indexed side tables over one heavyweight object per
|
|
217
281
|
token or node. Measure retained source, token, tree, diagnostic, and downstream-analysis memory.
|
|
282
|
+
- Define snapshot ownership so a tiny long-lived token cannot retain an obsolete multi-gigabyte
|
|
283
|
+
buffer. Keep hot token records compact, move uncommon payloads to side tables, and defer literal
|
|
284
|
+
cooking, normalization, and interning until a consumer requests them under its own budget.
|
|
218
285
|
- Support partial parsing only with a declared incomplete-tree contract and cancellation behavior.
|
|
219
|
-
- Measure p50, p95, and p99 edit latency,
|
|
220
|
-
time, and peak memory. Throughput
|
|
286
|
+
- Measure p50, p95, and p99 edit latency, `relexedBytesPerEdit`, reused-token or node ratio,
|
|
287
|
+
allocations per edit, diagnostic latency, post-processing time, and peak live memory. Throughput
|
|
288
|
+
on one clean file is not incremental-performance evidence.
|
|
221
289
|
|
|
222
290
|
### 12. Share one hostile-input budget
|
|
223
291
|
|
|
@@ -248,18 +316,26 @@ nested and composed parsers; do not reset counters at transformation or subgramm
|
|
|
248
316
|
|
|
249
317
|
### 13. Build a parser-specific test matrix
|
|
250
318
|
|
|
319
|
+
When a coverage-guided fuzz harness, corpus, custom mutator, feedback signal, sanitizer matrix,
|
|
320
|
+
campaign lifecycle, or artifact-triage path is in scope, apply `fuzz-harness-review` as the campaign
|
|
321
|
+
owner while keeping this skill responsible for parser-specific semantics and invariants.
|
|
322
|
+
|
|
251
323
|
Cover all applicable lanes:
|
|
252
324
|
|
|
253
325
|
- Valid corpus, invalid corpus, and near-valid single insert, delete, and replace mutations.
|
|
254
326
|
- Token-span coverage, lossless CST reconstruction, parse-print-parse grouping, and full-consumption
|
|
255
327
|
properties.
|
|
328
|
+
- Generated lexer-boundary matrices for operator prefixes, keyword prefixes, numeric followers,
|
|
329
|
+
dot-versus-range cases, string prefixes, raw delimiters, escapes, comment newline effects, EOF,
|
|
330
|
+
invalid encoding, and rule-order permutation where explicit priority should make order irrelevant.
|
|
256
331
|
- Operator pair and triple AST matrices, postfix chains, ternary forms, comparison chains, and
|
|
257
332
|
forbidden mixes.
|
|
258
333
|
- Full-parse versus incremental-parse differential tests over versioned edit sequences.
|
|
259
334
|
- One-shot input versus multiple chunk partitions, including boundaries inside multibyte sequences,
|
|
260
335
|
escapes, numbers, comments, and delimiters.
|
|
261
|
-
- Normalized differential oracles against an independent implementation when
|
|
262
|
-
|
|
336
|
+
- Normalized differential oracles against an intentionally independent implementation when
|
|
337
|
+
available, plus scanner-state serialize/deserialize continuation, round-trip, and preconditioned
|
|
338
|
+
metamorphic properties that do not require identical internal trees.
|
|
263
339
|
- Structured grammar-aware mutation, sanitizer or fault-injection lanes where supported, and
|
|
264
340
|
boundary cases immediately below, at, and above every budget.
|
|
265
341
|
- Growth-rate checks for time, work units, allocations, and retained bytes. Preserve the triggering
|
|
@@ -283,6 +359,14 @@ Unicode correctness, or hostile-input safety.
|
|
|
283
359
|
|
|
284
360
|
- Input is consumed fully or rejected explicitly, and every preserved source unit has an accountable
|
|
285
361
|
raw span.
|
|
362
|
+
- CST, surface AST, HIR or core tree, origin map, and side-table information-loss boundaries are
|
|
363
|
+
explicit, and missing or erroneous syntax cannot masquerade as normal executable meaning.
|
|
364
|
+
- Tree traversal, immutable transformation, transactional rewrite, persistent-handle, analysis-
|
|
365
|
+
invalidation, serialization, compatibility, bounded-decoding, and verifier contracts are explicit
|
|
366
|
+
when those surfaces exist.
|
|
367
|
+
- Lexer candidate selection, tie priority, identifier and keyword spelling, literal boundaries,
|
|
368
|
+
lexical goals, newline effects, Unicode profile, and malformed-token recovery are explicit rather
|
|
369
|
+
than inherited from host-library behavior.
|
|
286
370
|
- Lexer, speculation, recovery, and incremental reparsing have observable progress or budget exits.
|
|
287
371
|
- Position units and conversions are explicit at every external boundary.
|
|
288
372
|
- Operator grouping is defined by executable data and proven by AST-shape tests.
|
|
@@ -322,8 +406,10 @@ Unicode correctness, or hostile-input safety.
|
|
|
322
406
|
Report:
|
|
323
407
|
|
|
324
408
|
- Parser role and contract boundary.
|
|
325
|
-
- Source, token,
|
|
326
|
-
|
|
409
|
+
- Source, token-selection, identifier and keyword, literal, mode and lexical-goal, CST, surface AST,
|
|
410
|
+
lowering, origin, traversal, transformation, rewriting, tree identity and verifier, serialization,
|
|
411
|
+
compatibility, operator, recovery, incremental, Unicode, storage, and budget decisions that were
|
|
412
|
+
applicable.
|
|
327
413
|
- Files changed and compatibility behavior preserved or intentionally changed.
|
|
328
414
|
- Positive, boundary, counterexample, chunking, differential, and resource-limit evidence.
|
|
329
415
|
- Configured verification intents and results.
|