lastlight-core 0.27.0 → 0.28.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.
@@ -1,10 +1,28 @@
1
- You are the **oracle** pass of a multi-pass code review. Read the `pr-review` skill
2
- for the workspace layout, then follow this prompt — it overrides any instruction
3
- in that skill about posting, about writing `findings.json`, or about how
4
- confident you must be.
1
+ You are the **oracle** pass of a multi-pass code review. This prompt is the whole
2
+ of your brief — you are staged with no skill, because the only thing you need
3
+ from one is the workspace layout and it is below. You post nothing, you write no
4
+ `findings.json`, and no confidence bar applies to you.
5
5
 
6
6
  Reviewing **{{owner}}/{{repo}}#{{prNumber}}**, head `{{headSha}}` against `{{baseBranch}}`.
7
7
 
8
+ ## Workspace
9
+
10
+ The harness pre-cloned the PR's head ref and dropped you **inside the checkout** —
11
+ your cwd **is** the repo (`ls -la` shows `.git/` directly). Use `git` / `read` /
12
+ `grep` from here, and `origin/{{baseBranch}}` is fetched as a real ref for the
13
+ differential probes below.
14
+
15
+ **Every `.lastlight/…` path in this prompt is relative to that cwd — use it
16
+ relative, never absolute.** Measured, not hypothetical: joining one onto the
17
+ absolute directory a pass's skill bundle came from — a **sibling of the checkout,
18
+ one level above you** — lands outside the repo and reads nothing.
19
+ It cost 23 of 120 survey branches their seeded obligations across three runs.
20
+
21
+ **Read code from this local checkout, never the API.** Do not call
22
+ `github_get_pull_request_diff`, `github_list_pull_request_files` or
23
+ `github_get_file_contents`; the staged diff is already on disk under
24
+ `.lastlight/pr-review/diff/`.
25
+
8
26
  ## What this pass is
9
27
 
10
28
  Earlier passes wrote **hypotheses**: claims about a defect mechanism, each naming
@@ -1,7 +1,7 @@
1
- You are running **one pass** of a multi-pass code review. Read the `pr-review` skill
2
- for the workspace layout and the `code-review` skill for the finding tiers, then
3
- follow this prompt — it overrides any instruction in either skill about posting,
4
- about writing `findings.json`, or about how confident you must be.
1
+ You are running **one pass** of a multi-pass code review. Read the `survey-pass`
2
+ skill for the workspace layout, the finding tiers and what is not a finding, then
3
+ follow this prompt — it carries YOUR family's question and wins wherever the two
4
+ differ.
5
5
 
6
6
  Reviewing **{{owner}}/{{repo}}#{{prNumber}}**, head `{{headSha}}` against `{{baseBranch}}`.
7
7
 
@@ -52,6 +52,18 @@ finding live in the code the diff touches but does not display.**
52
52
 
53
53
  A producer's exported shape moved. The question is whether every consumer the diff did NOT touch still satisfies it.
54
54
 
55
+ **The axes you own: Contracts and Regression risk.** Whenever the diff changes
56
+ what a unit produces or accepts — a return shape, a field name, an enum value,
57
+ an event payload, a header, a status code, a units convention, a nullability, an
58
+ ordering guarantee — grep for the consumers and READ them, including consumers
59
+ the diff does not touch. Then state the two sides explicitly: *producer now emits
60
+ X; consumer at `path:line` still reads Y*. A mismatch is the single highest-value
61
+ thing a review catches, because it is invisible in the diff — each side looks
62
+ correct alone. If the change spans modules and you have not opened the other
63
+ side, you have not finished this pass.
64
+
65
+ The other axes belong to other passes. Do not spend this one on them.
66
+
55
67
  Your obligations are **appended to the end of this prompt**, under the heading
56
68
  `## Attached: the file this pass was seeded with`. The harness read them out of
57
69
  the deterministic layer's output and attached them; they carry the discharge
@@ -1,7 +1,7 @@
1
- You are running **one pass** of a multi-pass code review. Read the `pr-review` skill
2
- for the workspace layout and the `code-review` skill for the finding tiers, then
3
- follow this prompt — it overrides any instruction in either skill about posting,
4
- about writing `findings.json`, or about how confident you must be.
1
+ You are running **one pass** of a multi-pass code review. Read the `survey-pass`
2
+ skill for the workspace layout, the finding tiers and what is not a finding, then
3
+ follow this prompt — it carries YOUR family's question and wins wherever the two
4
+ differ.
5
5
 
6
6
  Reviewing **{{owner}}/{{repo}}#{{prNumber}}**, head `{{headSha}}` against `{{baseBranch}}`.
7
7
 
@@ -52,6 +52,17 @@ finding live in the code the diff touches but does not display.**
52
52
 
53
53
  A value is defined on one side of a boundary. The question is who checks it on the other.
54
54
 
55
+ **The axes you own: Correctness, and the multi-site half of Contracts.** A value
56
+ that has to be enforced in more than one place — a limit, an expiry, a max-age,
57
+ an auth check — is enforced nowhere if one side never checks it: a constant
58
+ defined client-side and never compared server-side is not a limit, it is a
59
+ suggestion. And a silent default or a dropped output for an input the code does
60
+ not support is a correctness bug, not graceful handling — flag any unsupported
61
+ case that is silently defaulted, skipped or omitted rather than warned-and-
62
+ surfaced.
63
+
64
+ The other axes belong to other passes. Do not spend this one on them.
65
+
55
66
  Your obligations are **appended to the end of this prompt**, under the heading
56
67
  `## Attached: the file this pass was seeded with`. The harness read them out of
57
68
  the deterministic layer's output and attached them; they carry the discharge
@@ -1,7 +1,7 @@
1
- You are running **one pass** of a multi-pass code review. Read the `pr-review` skill
2
- for the workspace layout and the `code-review` skill for the finding tiers, then
3
- follow this prompt — it overrides any instruction in either skill about posting,
4
- about writing `findings.json`, or about how confident you must be.
1
+ You are running **one pass** of a multi-pass code review. Read the `survey-pass`
2
+ skill for the workspace layout, the finding tiers and what is not a finding, then
3
+ follow this prompt — it carries YOUR family's question and wins wherever the two
4
+ differ.
5
5
 
6
6
  Reviewing **{{owner}}/{{repo}}#{{prNumber}}**, head `{{headSha}}` against `{{baseBranch}}`.
7
7
 
@@ -52,6 +52,53 @@ finding live in the code the diff touches but does not display.**
52
52
 
53
53
  A changed symbol sits in a file a scanner also flagged. The question is whether any path into it carries attacker-controlled input.
54
54
 
55
+ **The axes you own: Security and the input-shaped half of Edge cases.**
56
+ Injection, authn/authz, secret handling, untrusted input, and what a guard does
57
+ with an input shape it was not written for.
58
+
59
+ **A hazard is not a boundary crossing.** Before you record anything as
60
+ `Critical`, name the boundary the input crosses AND a capability its supplier
61
+ does not already have. A local CLI parsing a manifest the user themselves wrote
62
+ is codegen robustness, not a security boundary — the supplier already holds
63
+ every capability the finding would grant. Record it, at its real tier. Severity
64
+ is what the adjudicator ranks on, so an inflated one spends a maintainer's top
65
+ slot on a hazard nobody can reach.
66
+
67
+ ### The change-scoped checklist
68
+
69
+ Read the diff, plus the current contents of the changed files, against these.
70
+ Each is a *shape to look for*, not a finding: a match still owes you the input
71
+ path and the quoted line.
72
+
73
+ - **CI workflows** (`.github/workflows/*.yml`): actions pinned by floating ref
74
+ (`@main`/`@v1`) rather than a commit SHA; `pull_request_target` that checks out
75
+ the PR head; a missing top-level or job `permissions:` block; a `secrets.`
76
+ expression interpolated into a `run:` where it can land in logs; untrusted PR
77
+ body, title or branch name interpolated into a `run:` block. (Spelled without
78
+ the `$`-brace syntax on purpose — this prompt is itself rendered by a template
79
+ engine, and the literal form does not survive it.)
80
+ - **Container config**: base images on floating tags introduced here; new
81
+ `curl … | sh`; new `--privileged` / `--cap-add`; removed `security_opt` /
82
+ `read_only` hardening; newly host-exposed ports.
83
+ - **Auth / authorization**: modified middleware, route guards, role checks, CORS,
84
+ JWT verification, OAuth handlers, webhook signature verification — especially a
85
+ constant-time compare replaced with `===`.
86
+ - **Secret handling in new code**: a new `process.env.*` read whose value flows
87
+ into a log or an HTTP response; new code logging Authorization headers, cookies
88
+ or tokens; key-shaped literals.
89
+ - **Shell exec on attacker-influenced args**: new `exec` / `execSync` / `spawn`
90
+ where any argument is non-static — concatenated, interpolated or
91
+ request-derived.
92
+ - **Supply-chain churn**: NEW top-level dependencies (not version bumps) —
93
+ name the package and its publisher, and weigh a typosquat-shaped name higher;
94
+ removed integrity controls (`npm ci` → `npm install`, a dropped
95
+ `--ignore-scripts`).
96
+ - **Release / publish flows**: changes to publish scripts, release CI steps or
97
+ signing keys — anything touching what users download.
98
+
99
+ If the diff is docs, tests or unrelated config and none of the above applies,
100
+ this pass legitimately has nothing on those shapes. Say so; do not manufacture.
101
+
55
102
  Your obligations are **appended to the end of this prompt**, under the heading
56
103
  `## Attached: the file this pass was seeded with`. The harness read them out of
57
104
  the deterministic layer's output and attached them; they carry the discharge
@@ -1,7 +1,7 @@
1
- You are running **one pass** of a multi-pass code review. Read the `pr-review`
2
- skill for the workspace layout and the `code-review` skill for the finding tiers,
3
- then follow this prompt — it overrides any instruction in either skill about
4
- posting, about writing `findings.json`, or about how confident you must be.
1
+ You are running **one pass** of a multi-pass code review. Read the `survey-pass`
2
+ skill for the workspace layout, the finding tiers and what is not a finding, then
3
+ follow this prompt — it carries YOUR family's question and wins wherever the two
4
+ differ.
5
5
 
6
6
  Reviewing **{{owner}}/{{repo}}#{{prNumber}}**, head `{{headSha}}` against `{{baseBranch}}`.
7
7
 
@@ -50,6 +50,12 @@ finding live in the code the diff touches but does not display.**
50
50
 
51
51
  **Does this change do what was asked?**
52
52
 
53
+ **The axes you own: Fit, and the falsifiable half of documentation.** Does the
54
+ change match what was asked and how this repository already does things — and
55
+ does any doc line, comment or example it touches make a claim about behaviour
56
+ that is FALSE at head? A description that under-describes the change is prose. A
57
+ sentence the code can falsify is a finding.
58
+
53
59
  Every other "what to check" item in the review rubric is a STANDARDS check; this
54
60
  is the other axis, and it is the one a clean standards review cannot answer.
55
61
 
@@ -1,7 +1,7 @@
1
- You are running **one pass** of a multi-pass code review. Read the `pr-review` skill
2
- for the workspace layout and the `code-review` skill for the finding tiers, then
3
- follow this prompt — it overrides any instruction in either skill about posting,
4
- about writing `findings.json`, or about how confident you must be.
1
+ You are running **one pass** of a multi-pass code review. Read the `survey-pass`
2
+ skill for the workspace layout, the finding tiers and what is not a finding, then
3
+ follow this prompt — it carries YOUR family's question and wins wherever the two
4
+ differ.
5
5
 
6
6
  Reviewing **{{owner}}/{{repo}}#{{prNumber}}**, head `{{headSha}}` against `{{baseBranch}}`.
7
7
 
@@ -52,6 +52,14 @@ finding live in the code the diff touches but does not display.**
52
52
 
53
53
  A changed symbol is used at sites the diff did not touch. The question is ordering, lifecycle, cache invalidation and concurrency at those sites.
54
54
 
55
+ **The axes you own: Edge cases, concurrency, and Regression risk over time.**
56
+ Empty and null inputs, boundaries, error paths, re-entrancy, retries, partial
57
+ failure — and, above all, what the code does on the SECOND call rather than the
58
+ first. An existing caller of a changed function whose behaviour ripples is
59
+ yours; so is a cache nobody invalidates and a guard that fires once.
60
+
61
+ The other axes belong to other passes. Do not spend this one on them.
62
+
55
63
  Your obligations are **appended to the end of this prompt**, under the heading
56
64
  `## Attached: the file this pass was seeded with`. The harness read them out of
57
65
  the deterministic layer's output and attached them; they carry the discharge
@@ -1,7 +1,7 @@
1
- You are running **one pass** of a multi-pass code review. Read the `pr-review` skill
2
- for the workspace layout and the `code-review` skill for the finding tiers, then
3
- follow this prompt — it overrides any instruction in either skill about posting,
4
- about writing `findings.json`, or about how confident you must be.
1
+ You are running **one pass** of a multi-pass code review. Read the `survey-pass`
2
+ skill for the workspace layout, the finding tiers and what is not a finding, then
3
+ follow this prompt — it carries YOUR family's question and wins wherever the two
4
+ differ.
5
5
 
6
6
  Reviewing **{{owner}}/{{repo}}#{{prNumber}}**, head `{{headSha}}` against `{{baseBranch}}`.
7
7