@autotelic/joggle 0.7.0 → 0.7.2
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/JOGGLE.md +10 -0
- package/dist/check.js +18 -0
- package/dist/workspace.js +13 -2
- package/package.json +1 -1
package/JOGGLE.md
CHANGED
|
@@ -432,6 +432,16 @@ and every CI checkout. GitHub warns above **50 MB per file** and refuses above
|
|
|
432
432
|
`--max-age 90` needs ages, which only the machine cache records.
|
|
433
433
|
- A run says so when the store passes 8 MB, because a cache nobody measured is how
|
|
434
434
|
a 0-byte ledger on the base branch becomes 55 MB at the top of a stack.
|
|
435
|
+
- **Build output is never source.** The directory walk skips `node_modules`, `dist`,
|
|
436
|
+
`build`, `out`, `coverage`, `.next`, `.turbo`, `.vercel`, `.cache` and anything a
|
|
437
|
+
`.gitignore` excludes, and the checker's file list (under `--types`) is filtered the same
|
|
438
|
+
way. Without that, a tsconfig that includes `dist` made every declaration appear twice, and
|
|
439
|
+
the report said "declared in two places" about a build artifact — 73 of 95 findings on one
|
|
440
|
+
repository, present on a developer's machine and absent in CI because CI had never built.
|
|
441
|
+
- **A run says how it got its answers.** "N judgement(s) were asked of the model" means a
|
|
442
|
+
key was present and this run judged for itself; "N judgement(s) were replayed" means no model
|
|
443
|
+
was called. The two can name the same site differently, so a local report and a CI report at
|
|
444
|
+
the same commit are only comparable when this line matches.
|
|
435
445
|
- **A check does not write the ledger at all.** `--read-only` (and any run `jig` starts,
|
|
436
446
|
which exports `JIG_READ_ONLY=1` to every engine) answers from the cache and never writes
|
|
437
447
|
it. This is not hygiene: a new answer *renames* the finding it verifies, so a check that
|
package/dist/check.js
CHANGED
|
@@ -909,6 +909,24 @@ export const checkRepository = Effect.fn("joggle.check")(function* (options) {
|
|
|
909
909
|
overloaded,
|
|
910
910
|
};
|
|
911
911
|
const decisionTotals = yield* decisionStats.read;
|
|
912
|
+
// Say how the answers were obtained. A keyed run judges live and a keyless one replays,
|
|
913
|
+
// and the two can name the same site differently — which is the whole difference between
|
|
914
|
+
// a developer's machine and CI at the same commit. Without this line the report looks the
|
|
915
|
+
// same either way, and the difference is found by bisecting a ledger.
|
|
916
|
+
if (decisionTotals.calls > 0) {
|
|
917
|
+
notes.push({
|
|
918
|
+
ruleId: "joggle",
|
|
919
|
+
reason: decisionTotals.calls +
|
|
920
|
+
" judgement(s) were asked of the model in this run: a key was present, so this run judged for itself. A run without the key replays the committed answers, and judged identities are not always the unverified ones — compare this report with CI's before treating a difference as a code change.",
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
else if (decisionTotals.replayed > 0) {
|
|
924
|
+
notes.push({
|
|
925
|
+
ruleId: "joggle",
|
|
926
|
+
reason: decisionTotals.replayed +
|
|
927
|
+
" judgement(s) were replayed from the answer cache; no model was called",
|
|
928
|
+
});
|
|
929
|
+
}
|
|
912
930
|
const elapsedMs = (yield* Clock.currentTimeMillis) - started;
|
|
913
931
|
const report = {
|
|
914
932
|
diagnostics: rankDiagnostics(folded.diagnostics),
|
package/dist/workspace.js
CHANGED
|
@@ -1760,11 +1760,22 @@ export const discoverFiles = (root, inputs, discovered) => discovered !== undefi
|
|
|
1760
1760
|
const inScope = yield* tsconfigScope(root);
|
|
1761
1761
|
const walked = yield* resolveInputs(root, ["."]);
|
|
1762
1762
|
const astro = walked.files.filter((file) => isAstro(file) && inScope(path.relative(root, file).split(path.sep).join("/")));
|
|
1763
|
+
// The checker's file list is a tsconfig's include, and a tsconfig's include is not a
|
|
1764
|
+
// judgement about what is source: `packages/*/dist` is inside the program when a
|
|
1765
|
+
// declaration is emitted there. Analysing it reads every declaration twice — once as
|
|
1766
|
+
// written, once as built — and reports "Query is declared in two places" about a
|
|
1767
|
+
// build artifact. 73 of 95 findings on one repository were exactly that, and the
|
|
1768
|
+
// walk has always known better (`policy.ignoredDirectories`); this list did not.
|
|
1769
|
+
const keep = (file) => !path
|
|
1770
|
+
.relative(root, file)
|
|
1771
|
+
.split(path.sep)
|
|
1772
|
+
.some((segment) => ignored.has(segment));
|
|
1773
|
+
const files = discovered.filter(keep);
|
|
1763
1774
|
return {
|
|
1764
|
-
files: [...
|
|
1775
|
+
files: [...files, ...astro.filter(keep)].sort(Order.String),
|
|
1765
1776
|
skippedExtensions: [],
|
|
1766
1777
|
truncated: walked.truncated,
|
|
1767
|
-
ignored:
|
|
1778
|
+
ignored: discovered.length - files.length,
|
|
1768
1779
|
ignoredDirectories: 0,
|
|
1769
1780
|
};
|
|
1770
1781
|
})
|