lastlight-core 0.33.1 → 0.34.0
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/config/default.yaml +137 -48
- package/dist/config/config.d.ts +1 -1
- package/dist/config/config.js +45 -29
- package/dist/config/config.js.map +1 -1
- package/dist/engine/event-shim.d.ts +22 -0
- package/dist/engine/event-shim.js +98 -0
- package/dist/engine/event-shim.js.map +1 -1
- package/dist/engine/executors/orchestrator.js +20 -1
- package/dist/engine/executors/orchestrator.js.map +1 -1
- package/dist/engine/github/review-poster.d.ts +249 -40
- package/dist/engine/github/review-poster.js +332 -54
- package/dist/engine/github/review-poster.js.map +1 -1
- package/dist/engine/github/review-summary.d.ts +61 -0
- package/dist/engine/github/review-summary.js +101 -0
- package/dist/engine/github/review-summary.js.map +1 -0
- package/dist/engine/pr-decisions.d.ts +16 -0
- package/dist/engine/pr-decisions.js +127 -11
- package/dist/engine/pr-decisions.js.map +1 -1
- package/dist/engine/review-spec.d.ts +1 -1
- package/dist/engine/review-spec.js +69 -38
- package/dist/engine/review-spec.js.map +1 -1
- package/dist/sandbox/docker.js +6 -0
- package/dist/sandbox/docker.js.map +1 -1
- package/dist/sandbox/k8s/run-agent-script.js +5 -0
- package/dist/sandbox/k8s/run-agent-script.js.map +1 -1
- package/dist/sandbox/sandbox.d.ts +7 -0
- package/dist/sandbox/sandbox.js +13 -0
- package/dist/sandbox/sandbox.js.map +1 -1
- package/dist/sandbox/smol.js +6 -0
- package/dist/sandbox/smol.js.map +1 -1
- package/dist/session-log.js +4 -0
- package/dist/session-log.js.map +1 -1
- package/dist/telemetry/openinference.d.ts +13 -0
- package/dist/telemetry/openinference.js +13 -0
- package/dist/telemetry/openinference.js.map +1 -1
- package/dist/telemetry/pi-events.js +16 -1
- package/dist/telemetry/pi-events.js.map +1 -1
- package/dist/workflows/handlers/fanout.d.ts +42 -7
- package/dist/workflows/handlers/fanout.js +145 -19
- package/dist/workflows/handlers/fanout.js.map +1 -1
- package/dist/workflows/handlers/post-review.d.ts +17 -0
- package/dist/workflows/handlers/post-review.js +137 -50
- package/dist/workflows/handlers/post-review.js.map +1 -1
- package/dist/workflows/runner.js +1 -1
- package/dist/workflows/runner.js.map +1 -1
- package/package.json +5 -5
- package/skills/adjudicate-pass/SKILL.md +24 -20
- package/skills/survey-pass/SKILL.md +121 -130
- package/workflows/pr-review.yaml +210 -7
- package/workflows/prompts/review-adjudicate.md +388 -263
- package/workflows/prompts/review-falsify.md +185 -44
- package/workflows/prompts/review.md +10 -10
- package/workflows/prompts/survey-contract.md +48 -48
- package/workflows/prompts/survey-enforcement.md +102 -134
- package/workflows/prompts/survey-security.md +53 -56
- package/workflows/prompts/survey-spec.md +52 -37
- package/workflows/prompts/survey-state.md +54 -53
- package/workflows/prompts/survey-tests.md +48 -48
package/config/default.yaml
CHANGED
|
@@ -39,6 +39,8 @@ models:
|
|
|
39
39
|
# diagnose: anthropic/claude-haiku-4-5-20251001 # the CI-failure classifier
|
|
40
40
|
# pr-fix-retry: anthropic/claude-opus-4-8 # used above fix.escalateModelAfterAttempt
|
|
41
41
|
# review-adjudicate: anthropic/claude-sonnet-4-6 # the adjudication pass
|
|
42
|
+
# review-summary: openai/gpt-5.4-mini # post-review's summary, written after the caps
|
|
43
|
+
# review-falsify: anthropic/claude-haiku-4-5-20251001 # the probe oracle
|
|
42
44
|
# A per-task entry wins over `default`. `classifier`/`screener` are the cheap
|
|
43
45
|
# one-shot helpers (src/engine/llm.ts); when unset they fall back to the first
|
|
44
46
|
# configured provider's fast model, NOT `default`.
|
|
@@ -53,8 +55,8 @@ models:
|
|
|
53
55
|
#
|
|
54
56
|
# `review-survey` is SET above, and it is the one entry in this block that is
|
|
55
57
|
# not an example. It is the key the five survey branches of `pr-review.yaml`
|
|
56
|
-
# declare (`model: "{{models.review-survey}}"`, one per obligation family)
|
|
57
|
-
# and
|
|
58
|
+
# declare (`model: "{{models.review-survey}}"`, one per obligation family),
|
|
59
|
+
# and the `falsify` phase's fall-through.
|
|
58
60
|
#
|
|
59
61
|
# Pinning it to Haiku 4.5 is NOT a cost downgrade, and that is the unusual
|
|
60
62
|
# part: on review RECALL, Haiku 4.5 BEATS Sonnet 4.6 on two independent evals
|
|
@@ -79,6 +81,15 @@ models:
|
|
|
79
81
|
# `config.yaml` (a cheap, fast model of its own provider), exactly as it
|
|
80
82
|
# already overrides `models.default`.
|
|
81
83
|
#
|
|
84
|
+
# `review-falsify` is the ORACLE's own key — the one phase that runs code.
|
|
85
|
+
# Unset, it falls through to `review-survey` (its template is the same
|
|
86
|
+
# `{{#if}}` pair `adjudicate` uses, so an unset key lands on the survey model
|
|
87
|
+
# and not on `default`), which is exactly the behaviour before the key
|
|
88
|
+
# existed. It exists so the oracle's model can be moved on its own: it was
|
|
89
|
+
# hard-wired to `review-survey`, so asking "is a cheap model good enough at
|
|
90
|
+
# WRITING AND RUNNING a probe?" meant moving all five survey branches too —
|
|
91
|
+
# two variables, and therefore not a runnable experiment.
|
|
92
|
+
#
|
|
82
93
|
# `review-adjudicate` is the adjudicate phase's own key in `pr-review.yaml` —
|
|
83
94
|
# the RANKING pass over what the surveys found, a different task from survey
|
|
84
95
|
# discovery, so it can be moved independently of `models.review`. Unset, it
|
|
@@ -524,6 +535,51 @@ review:
|
|
|
524
535
|
# telemetry (and the clean-discharge demotion it enables at the posting
|
|
525
536
|
# boundary), at the cost of the verification-report volume above.
|
|
526
537
|
obligationContract: minimal
|
|
538
|
+
# What `adjudicate` is handed, and what shape it writes back (#399).
|
|
539
|
+
#
|
|
540
|
+
# legacy — the shipped phase. The prompt names the files and the model
|
|
541
|
+
# shells out to assemble them, then writes a `tier` and a
|
|
542
|
+
# `confidence` per finding.
|
|
543
|
+
# dossier — a deterministic `dossier` phase renders every record the
|
|
544
|
+
# phase needs and the harness attaches it, and the model writes
|
|
545
|
+
# typed attributes (`claim` / `category` / `fix`) from which a
|
|
546
|
+
# pure function derives the tier. `confidence` is not asked for.
|
|
547
|
+
#
|
|
548
|
+
# ONE key for both halves deliberately: they move the same phase's measured
|
|
549
|
+
# surface — its input and its output — so shipping them together costs one
|
|
550
|
+
# comparability break with the archive instead of two, and one arm validates
|
|
551
|
+
# both.
|
|
552
|
+
#
|
|
553
|
+
# What it targets, measured on the 8-case probes arm: adjudicate spends 137
|
|
554
|
+
# bash calls across 8 adjudications (35 turns, 30 of them bash on the stress
|
|
555
|
+
# case) re-deriving records the harness already holds — about a third of
|
|
556
|
+
# case cost — and makes its actual judgement at the end of that transcript.
|
|
557
|
+
#
|
|
558
|
+
# jev — implies `dossier` (same rendering, same typed output) and
|
|
559
|
+
# additionally runs `jev-classify`: one TypeSafe `systemOne`
|
|
560
|
+
# call PER HYPOTHESIS (not per finding — hypotheses vastly
|
|
561
|
+
# outnumber findings, and per-hypothesis is the volume a
|
|
562
|
+
# System-1 primitive is for), asking only the category axis
|
|
563
|
+
# measured at AUC 0.897 (never correctness, measured dead at
|
|
564
|
+
# AUC 0.534). Its category is rendered into the dossier as an
|
|
565
|
+
# ADVISORY line — Sonnet still writes every disposition
|
|
566
|
+
# itself. Measured 2026-09-22: 260 hypotheses / 8 cases,
|
|
567
|
+
# 83.6% agreement with Sonnet's own call on identical
|
|
568
|
+
# evidence, $0.0053. Weakest on the rarest, highest-stakes
|
|
569
|
+
# categories (`defect` 33%, `correctness-risk` 40% recall
|
|
570
|
+
# against Sonnet) — that is why it annotates rather than
|
|
571
|
+
# decides. Needs `TYPESAFE_KEY` (or `TYPESAFE_API_KEY`); its
|
|
572
|
+
# absence degrades the phase to "no annotation", never a
|
|
573
|
+
# failed run.
|
|
574
|
+
#
|
|
575
|
+
# `legacy` until an arm has run for each. An unrecognised value lands there
|
|
576
|
+
# too.
|
|
577
|
+
adjudicate: legacy
|
|
578
|
+
# The TypeSafe model `jev-classify` calls, under `adjudicate: "jev"`.
|
|
579
|
+
# `null` = the CLI's own default (`TYPESAFE_MODEL` env, else `jev-latest`).
|
|
580
|
+
# Kept out of the `models:` map above — TypeSafe is a distinct provider
|
|
581
|
+
# from the `provider/model` chat models that map resolves.
|
|
582
|
+
jevModel: null
|
|
527
583
|
|
|
528
584
|
# Which D2 minting rules `lastlight-facts seed` runs beyond the original
|
|
529
585
|
# four. A comma-list; the valid tokens are `all-in-diff` (contract
|
|
@@ -567,27 +623,51 @@ review:
|
|
|
567
623
|
|
|
568
624
|
# ── WP4: `prepare` (the affordance) + `falsify` (the oracle) ──────────────
|
|
569
625
|
#
|
|
570
|
-
# A SECOND switch under an already-gated block, and
|
|
571
|
-
#
|
|
572
|
-
# that one fact changes three things at once:
|
|
626
|
+
# A SECOND switch under an already-gated block, and TRI-STATE — the middle
|
|
627
|
+
# value is the point of it.
|
|
573
628
|
#
|
|
574
|
-
#
|
|
575
|
-
#
|
|
576
|
-
#
|
|
577
|
-
#
|
|
578
|
-
#
|
|
579
|
-
#
|
|
580
|
-
#
|
|
581
|
-
#
|
|
582
|
-
#
|
|
583
|
-
#
|
|
584
|
-
#
|
|
585
|
-
#
|
|
629
|
+
# "off" — neither `prepare` nor `falsify` runs. Reproduces WP3 exactly,
|
|
630
|
+
# and it is the shipped posture: the whole pipeline is off out
|
|
631
|
+
# of the box (LD8).
|
|
632
|
+
# "static" — both phases run and NOTHING IS EVER INSTALLED. `prepare` runs
|
|
633
|
+
# with `--no-install`, so it writes a real `env.json`
|
|
634
|
+
# (`install: "skipped"`, `installed` still read off the
|
|
635
|
+
# filesystem) and `falsify` gets the fact its prompt is written
|
|
636
|
+
# against: it already branches on `installed: false`, records
|
|
637
|
+
# what it cannot run as `unprobed` with a reason, and those
|
|
638
|
+
# hypotheses SURVIVE to adjudication. The oracle was written
|
|
639
|
+
# for the zero-install world; one shared gate was all that kept
|
|
640
|
+
# it out of one. Seconds of CPU, no package manager, no test
|
|
641
|
+
# suite, no `postinstall` from a pull request head.
|
|
642
|
+
# "full" — `prepare` installs. What that buys is the DISCOVERY side, not
|
|
643
|
+
# the probe side: a tsconfig that `extends` a bare package
|
|
644
|
+
# specifier (`@calcom/tsconfig/react-library`) does not resolve
|
|
645
|
+
# on a bare checkout, tsgo excludes the project, and the case
|
|
646
|
+
# drops to tier 2 with `contracts` emitting nothing — measured
|
|
647
|
+
# over the 50-PR corpus, tier-1 cases 21 -> 5 and contract
|
|
648
|
+
# deltas 73 -> 19. It is also the only route to a coverage
|
|
649
|
+
# artifact, so until `probeCoverage` produces one the `tests`
|
|
650
|
+
# family is NOT MEASURED, a different row from "did not
|
|
651
|
+
# convert".
|
|
586
652
|
#
|
|
587
|
-
#
|
|
588
|
-
#
|
|
589
|
-
|
|
590
|
-
#
|
|
653
|
+
# Two costs that are NOT metered anywhere, and this is the only
|
|
654
|
+
# place they are written down. There is no disk guard — not in
|
|
655
|
+
# `prepare`, not in `prepareTree`, not in the workflow — and
|
|
656
|
+
# the warm-workspace refresh is deliberately
|
|
657
|
+
# `git clean -fdx -e node_modules`, so `node_modules` PERSISTS
|
|
658
|
+
# across reviews by design. `full` is therefore a permanent
|
|
659
|
+
# per-target disk cost with nothing watching the volume. And
|
|
660
|
+
# the `facts` phase inherits the installed tree on every
|
|
661
|
+
# re-review; peak RSS there is UNMEASURED on the current
|
|
662
|
+
# engine.
|
|
663
|
+
#
|
|
664
|
+
# A bare `true` reads as "static", never "full": no deployment may silently
|
|
665
|
+
# gain an install by upgrading. Anything else — including the truthy strings
|
|
666
|
+
# — reads as "off", the same direction every switch in this block fails.
|
|
667
|
+
probes: "off"
|
|
668
|
+
# Let the install run the tree's own postinstall. Applies to `full` alone —
|
|
669
|
+
# there is no install to attach a script to under `static`, and the phase
|
|
670
|
+
# never claims otherwise in `env.json`. OFF, as a SECURITY default:
|
|
591
671
|
# `prepare` installs at a PULL REQUEST HEAD, so a lifecycle script there is
|
|
592
672
|
# code the PR author wrote running on this machine — and `pr-review`'s
|
|
593
673
|
# workspace has never installed anything, which makes this the first thing in
|
|
@@ -615,6 +695,19 @@ review:
|
|
|
615
695
|
# five-line existence gate, not a validator — v2's full quote validator was
|
|
616
696
|
# overkill and cost 2.4x for a worse result.
|
|
617
697
|
probeRounds: 2
|
|
698
|
+
# The WHOLE-PHASE ceiling on `falsify`, across every round. It had none at
|
|
699
|
+
# all until the oracle could run without an install, and `probeRounds` was
|
|
700
|
+
# never a budget: a round count bounds how many times the loop may go round,
|
|
701
|
+
# not what it may spend, and CPU is this pipeline's binding constraint. Ten
|
|
702
|
+
# minutes covers two rounds of a pass whose probes are sub-second by
|
|
703
|
+
# construction (a differential `git` run, a copied pure function under plain
|
|
704
|
+
# `node`) and whose real cost is model latency.
|
|
705
|
+
falsifyTimeoutSeconds: 600
|
|
706
|
+
# The WHOLE-PHASE ceiling on `jev-classify`, under `adjudicate: "jev"`.
|
|
707
|
+
# Each call is a TypeSafe `systemOne` round trip (~100ms typically) but the
|
|
708
|
+
# phase makes one per hypothesis and a case can carry dozens; 120s covers
|
|
709
|
+
# a slow provider day without threatening the falsify-sized budget above.
|
|
710
|
+
jevTimeoutSeconds: 120
|
|
618
711
|
# The attention boundary (WP6b). Preserving internal recall and spending a
|
|
619
712
|
# human's attention are two different budgets; conflating them is how a
|
|
620
713
|
# recall-first reviewer becomes unreadable.
|
|
@@ -624,15 +717,19 @@ review:
|
|
|
624
717
|
# for being noisy: this is an attention boundary, not the v2 suppressor that
|
|
625
718
|
# was built, measured and reverted.
|
|
626
719
|
#
|
|
627
|
-
#
|
|
628
|
-
# comments
|
|
629
|
-
#
|
|
630
|
-
#
|
|
631
|
-
#
|
|
632
|
-
|
|
720
|
+
# Five, down from ten (issue #405). Ten came from "Does AI Code Review Lead
|
|
721
|
+
# to Code Changes?" (22k+ real review comments; the wall it warns about is
|
|
722
|
+
# twenty) and never bound while inline volume was 1–5 per PR. The all-open
|
|
723
|
+
# Martian arm then posted 5–13 a case at precision 0.15–0.40 against two
|
|
724
|
+
# gold. It can bite now because what it ranks on varies: a hypothesis-
|
|
725
|
+
# derived finding's severity is DERIVED from its evidence record and probe
|
|
726
|
+
# strength (code-facts finding-severity.ts, stamped by `reconcile`), so the
|
|
727
|
+
# cut keeps boundary-crossing and executed claims over local, read-only
|
|
728
|
+
# ones. The overflow still goes to the body, then to the body budget.
|
|
729
|
+
maxInlineComments: 5
|
|
633
730
|
# The BODY budget — how many findings the review body's "Additional
|
|
634
731
|
# findings" list may carry. N (the default is 5) keeps the top N ranked by
|
|
635
|
-
# severity
|
|
732
|
+
# severity and records the rest in disposition.json at
|
|
636
733
|
# `internal` with reason `body-budget` — capped attention, never a lost
|
|
637
734
|
# record. 0 = NO overflow at all (nothing tiers to body); null = unlimited
|
|
638
735
|
# (the pre-2026-08-24 funnel).
|
|
@@ -648,27 +745,19 @@ review:
|
|
|
648
745
|
# slightly better precision). 5 is the recall-preserving compromise pending
|
|
649
746
|
# a real boundary tune — so an eval overlay measuring a particular shape
|
|
650
747
|
# should still pin this key (`null` for the open funnel) explicitly rather
|
|
651
|
-
# than inherit it.
|
|
748
|
+
# than inherit it. A deployment overlay should NOT pin `null`: that is the
|
|
749
|
+
# open funnel issue #405 measured posting every claim, and the body budget
|
|
750
|
+
# is only a ranking cut once severity varies (see maxInlineComments).
|
|
652
751
|
maxBodyComments: 5
|
|
653
|
-
#
|
|
654
|
-
#
|
|
655
|
-
#
|
|
656
|
-
#
|
|
657
|
-
#
|
|
658
|
-
#
|
|
659
|
-
#
|
|
660
|
-
#
|
|
661
|
-
|
|
662
|
-
contract: 0.35 # converts; cheap to check; bias to surface
|
|
663
|
-
enforcement: 0.35
|
|
664
|
-
security: 0.30
|
|
665
|
-
state: 0.50
|
|
666
|
-
tests: 0.60 # mechanical provenance, but noisier as prose
|
|
667
|
-
spec: 0.45
|
|
668
|
-
# Below this, recorded in findings.json but not posted at all. The one tier
|
|
669
|
-
# that costs recall, so it is low. A finding carrying NO confidence is never
|
|
670
|
-
# affected — an absent field is not a zero.
|
|
671
|
-
internalFloor: 0.15
|
|
752
|
+
# REMOVED 2026-09-21: `thresholds` (the per-family confidence bars) and
|
|
753
|
+
# `internalFloor`. Both gated on a finding's self-reported `confidence`,
|
|
754
|
+
# which measured AUROC 0.228 [0.171, 0.299] over 516 findings from 20
|
|
755
|
+
# preserved case-runs — a strong signal pointing the WRONG way, because the
|
|
756
|
+
# model is surest about the observations where nothing is wrong (withheld
|
|
757
|
+
# findings carried a HIGHER median confidence, 0.99, than posted ones).
|
|
758
|
+
# They also cost nothing: across the preserved archive not one gold finding
|
|
759
|
+
# was ever lost to `below-floor` or `below-threshold`. An overlay that
|
|
760
|
+
# still pins either key is accepted and ignored, with a warning in the log.
|
|
672
761
|
|
|
673
762
|
# The software-factory pipeline (label-driven autonomy).
|
|
674
763
|
#
|
package/dist/config/config.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export type { SandboxBackend, BuildAssetsLocation, OtelConfig } from "lastlight-
|
|
|
56
56
|
import type { DisabledConfig, RouteConfig } from "lastlight-shared/config-types";
|
|
57
57
|
export type { DisabledConfig, RouteConfig } from "lastlight-shared/config-types";
|
|
58
58
|
import { type DependenciesConfig, type FixConfig, type GateConfig, type ReviewConfig, type ReviewPolicy, type SandboxTimeoutsConfig } from "lastlight-shared/config-types";
|
|
59
|
-
export type { DependenciesConfig, DependencyImpact, FixConfig, GateConfig, NotificationsConfig, ReviewConfig, ReviewPolicy, ReviewTrigger, SandboxTimeoutsConfig, } from "lastlight-shared/config-types";
|
|
59
|
+
export type { DependenciesConfig, DependencyImpact, FixConfig, GateConfig, NotificationsConfig, ProbeMode, ReviewConfig, ReviewPolicy, ReviewTrigger, SandboxTimeoutsConfig, } from "lastlight-shared/config-types";
|
|
60
60
|
export { defaultDependenciesConfig, defaultFixConfig, defaultNotificationsConfig, defaultReviewPolicy, } from "lastlight-shared/config-types";
|
|
61
61
|
export interface PublicConfigBundle {
|
|
62
62
|
default: Record<string, unknown>;
|
package/dist/config/config.js
CHANGED
|
@@ -50,7 +50,7 @@ function loadDotEnv(path) {
|
|
|
50
50
|
// compiles — has to name their shape and their shipped defaults. Imported for
|
|
51
51
|
// in-file use and re-exported so `../config/config.js` stays the one import
|
|
52
52
|
// surface for the runtime config shape.
|
|
53
|
-
import { DIAGNOSIS_CLASSES, defaultDependenciesConfig, defaultFixConfig, defaultReviewPolicy, isDependencyImpact, isDiagnosisClass, isReviewTrigger, } from "lastlight-shared/config-types";
|
|
53
|
+
import { DIAGNOSIS_CLASSES, coerceAdjudicateMode, coerceProbeMode, defaultDependenciesConfig, defaultFixConfig, defaultReviewPolicy, isDependencyImpact, isDiagnosisClass, isReviewTrigger, } from "lastlight-shared/config-types";
|
|
54
54
|
export { defaultDependenciesConfig, defaultFixConfig, defaultNotificationsConfig, defaultReviewPolicy, } from "lastlight-shared/config-types";
|
|
55
55
|
export { DEFAULT_REPO_CONFIG_ALLOW_KEYS } from "lastlight-shared/repo-config-schema";
|
|
56
56
|
let currentConfig;
|
|
@@ -302,6 +302,8 @@ export function withReviewDurations(policy, operator) {
|
|
|
302
302
|
factsTimeoutSeconds: operator.analysis.factsTimeoutSeconds,
|
|
303
303
|
seedTimeoutSeconds: operator.analysis.seedTimeoutSeconds,
|
|
304
304
|
reconcileTimeoutSeconds: operator.analysis.reconcileTimeoutSeconds,
|
|
305
|
+
falsifyTimeoutSeconds: operator.analysis.falsifyTimeoutSeconds,
|
|
306
|
+
jevTimeoutSeconds: operator.analysis.jevTimeoutSeconds,
|
|
305
307
|
},
|
|
306
308
|
};
|
|
307
309
|
}
|
|
@@ -631,6 +633,7 @@ function normalizeFileConfig(raw) {
|
|
|
631
633
|
const exploreRaw = isPlainObject(raw.explore) ? raw.explore : {};
|
|
632
634
|
const reviewRaw = isPlainObject(raw.review) ? raw.review : {};
|
|
633
635
|
const analysisRaw = isPlainObject(reviewRaw.analysis) ? reviewRaw.analysis : {};
|
|
636
|
+
warnRemovedBoundaryKeys(analysisRaw);
|
|
634
637
|
const triageRaw = isPlainObject(reviewRaw.triage) ? reviewRaw.triage : {};
|
|
635
638
|
const autonomyRaw = isPlainObject(raw.autonomy) ? raw.autonomy : {};
|
|
636
639
|
const fixRaw = isPlainObject(raw.fix) ? raw.fix : {};
|
|
@@ -797,12 +800,22 @@ function normalizeFileConfig(raw) {
|
|
|
797
800
|
// asks for six on gondolin still gets one — the operator's ask is not the
|
|
798
801
|
// effective value and the run logs when the host overrides it.
|
|
799
802
|
surveyConcurrency: nonNegativeNumber(analysisRaw.surveyConcurrency) ?? reviewDefaults.analysis.surveyConcurrency,
|
|
800
|
-
// WP4.
|
|
801
|
-
//
|
|
802
|
-
// `
|
|
803
|
-
// `probeLifecycleScripts` (which runs that
|
|
804
|
-
// decisions a truthy-ish string in an overlay
|
|
805
|
-
|
|
803
|
+
// WP4. `probes` is TRI-STATE (`off` | `static` | `full`) and the other
|
|
804
|
+
// three still read `=== true`, for the same reason `enabled` does: each
|
|
805
|
+
// buys the operator's compute, and two of them — `full` (which installs a
|
|
806
|
+
// PR author's dependencies) and `probeLifecycleScripts` (which runs that
|
|
807
|
+
// author's postinstall) — are decisions a truthy-ish string in an overlay
|
|
808
|
+
// must never make by accident. `coerceProbeMode` keeps exactly that
|
|
809
|
+
// spirit: only the literal `"full"` installs, a bare `true` lands on
|
|
810
|
+
// `"static"` (so no existing deployment gains an install by upgrading),
|
|
811
|
+
// and every other value — including `"true"` and `"yes"` — is `"off"`.
|
|
812
|
+
probes: coerceProbeMode(analysisRaw.probes),
|
|
813
|
+
// #399. Selects what `adjudicate` is handed and what shape it writes
|
|
814
|
+
// back, in ONE key because both halves move the same phase's measured
|
|
815
|
+
// surface. Only the literal `"dossier"` moves a deployment; everything
|
|
816
|
+
// else is the shipped phase, which is the direction the whole block
|
|
817
|
+
// fails.
|
|
818
|
+
adjudicate: coerceAdjudicateMode(analysisRaw.adjudicate),
|
|
806
819
|
probeLifecycleScripts: analysisRaw.probeLifecycleScripts === true,
|
|
807
820
|
probeTypecheck: analysisRaw.probeTypecheck === true,
|
|
808
821
|
probeCoverage: analysisRaw.probeCoverage === true,
|
|
@@ -811,19 +824,12 @@ function normalizeFileConfig(raw) {
|
|
|
811
824
|
factsTimeoutSeconds: requiredSeconds(analysisRaw.factsTimeoutSeconds, "review.analysis.factsTimeoutSeconds"),
|
|
812
825
|
seedTimeoutSeconds: requiredSeconds(analysisRaw.seedTimeoutSeconds, "review.analysis.seedTimeoutSeconds"),
|
|
813
826
|
reconcileTimeoutSeconds: requiredSeconds(analysisRaw.reconcileTimeoutSeconds, "review.analysis.reconcileTimeoutSeconds"),
|
|
827
|
+
falsifyTimeoutSeconds: requiredSeconds(analysisRaw.falsifyTimeoutSeconds, "review.analysis.falsifyTimeoutSeconds"),
|
|
814
828
|
probeRounds: nonNegativeNumber(analysisRaw.probeRounds) ?? reviewDefaults.analysis.probeRounds,
|
|
815
829
|
// WP6b, the attention boundary. `maxInlineComments` allows 0 — a
|
|
816
830
|
// deployment that wants every finding in the review body is a coherent
|
|
817
831
|
// choice — so `nonNegativeNumber` is right and `|| default` would not be.
|
|
818
832
|
maxInlineComments: nonNegativeNumber(analysisRaw.maxInlineComments) ?? reviewDefaults.analysis.maxInlineComments,
|
|
819
|
-
// The per-family bars merge onto the packaged set rather than replacing
|
|
820
|
-
// it: an overlay tuning ONE family must not silently un-bar the other
|
|
821
|
-
// five, which a whole-map replacement would do.
|
|
822
|
-
thresholds: {
|
|
823
|
-
...reviewDefaults.analysis.thresholds,
|
|
824
|
-
...numericMap(analysisRaw.thresholds),
|
|
825
|
-
},
|
|
826
|
-
internalFloor: nonNegativeNumber(analysisRaw.internalFloor) ?? reviewDefaults.analysis.internalFloor,
|
|
827
833
|
// The body-side budget. Nullable exactly like `fix.maxCostUsd` above: an
|
|
828
834
|
// explicit `null` is the documented "unlimited body overflow" value (the
|
|
829
835
|
// legacy funnel), distinct from an absent/typo'd key, which falls back
|
|
@@ -833,6 +839,11 @@ function normalizeFileConfig(raw) {
|
|
|
833
839
|
maxBodyComments: analysisRaw.maxBodyComments === null
|
|
834
840
|
? null
|
|
835
841
|
: nonNegativeNumber(analysisRaw.maxBodyComments) ?? reviewDefaults.analysis.maxBodyComments,
|
|
842
|
+
// #399 idea 2. `null` ⇒ `jev-classify`'s own default. A non-string is
|
|
843
|
+
// the same direction every switch in this block fails: the default,
|
|
844
|
+
// never a fabricated model id.
|
|
845
|
+
jevModel: typeof analysisRaw.jevModel === "string" ? analysisRaw.jevModel.trim() : reviewDefaults.analysis.jevModel,
|
|
846
|
+
jevTimeoutSeconds: requiredSeconds(analysisRaw.jevTimeoutSeconds, "review.analysis.jevTimeoutSeconds"),
|
|
836
847
|
},
|
|
837
848
|
};
|
|
838
849
|
// The autonomy pipeline (issue: the software factory). Lenient like every
|
|
@@ -1080,21 +1091,26 @@ function nonNegativeNumber(raw) {
|
|
|
1080
1091
|
return typeof raw === "number" && Number.isFinite(raw) && raw >= 0 ? raw : undefined;
|
|
1081
1092
|
}
|
|
1082
1093
|
/**
|
|
1083
|
-
*
|
|
1084
|
-
*
|
|
1085
|
-
*
|
|
1086
|
-
*
|
|
1087
|
-
*
|
|
1094
|
+
* Keys this config once honoured under `review.analysis` and now IGNORES.
|
|
1095
|
+
*
|
|
1096
|
+
* Both were confidence gates on the attention boundary, removed 2026-09-21
|
|
1097
|
+
* after `finding.confidence` measured AUROC 0.228 [0.171, 0.299] over 516
|
|
1098
|
+
* findings — a strong signal pointing the wrong way — and after the preserved
|
|
1099
|
+
* archive showed neither had ever cost a gold finding. Two overlay repos and
|
|
1100
|
+
* ~17 eval overlays may still pin them, so they are ACCEPTED AND IGNORED
|
|
1101
|
+
* rather than rejected: this loader reads only the keys it knows, so an
|
|
1102
|
+
* unknown leaf was already inert. The warning is so an operator who pinned one
|
|
1103
|
+
* learns it stopped meaning anything, instead of believing a bar is in force.
|
|
1088
1104
|
*/
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1105
|
+
const REMOVED_ANALYSIS_KEYS = ["internalFloor", "thresholds"];
|
|
1106
|
+
function warnRemovedBoundaryKeys(analysisRaw) {
|
|
1107
|
+
const present = REMOVED_ANALYSIS_KEYS.filter((k) => analysisRaw[k] !== undefined);
|
|
1108
|
+
if (present.length === 0)
|
|
1109
|
+
return;
|
|
1110
|
+
log.warn("review.analysis keys were removed and are ignored", {
|
|
1111
|
+
keys: present,
|
|
1112
|
+
detail: "the attention boundary no longer gates on finding.confidence (AUROC 0.228); remove these keys from your overlay",
|
|
1113
|
+
});
|
|
1098
1114
|
}
|
|
1099
1115
|
/**
|
|
1100
1116
|
* A whole number >= 0, or `undefined` so the caller can apply its own default —
|