@sreetej510/pi-shipd-checks 0.3.9 → 0.4.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/README.md +34 -39
- package/dist/fargate-worker.mjs +185 -185
- package/dist/index.js +56 -50
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,58 +1,47 @@
|
|
|
1
1
|
# @sreetej510/pi-shipd-checks
|
|
2
2
|
|
|
3
|
-
A [pi](https://github.com/earendil-works/pi) coding agent extension that
|
|
4
|
-
coverage gaps
|
|
3
|
+
A [pi](https://github.com/earendil-works/pi) coding agent extension that analyzes benchmark
|
|
4
|
+
tests for behavioral coverage gaps, fairness, and test strength.
|
|
5
5
|
|
|
6
6
|
## What it does
|
|
7
7
|
|
|
8
|
-
For
|
|
8
|
+
For `/checks`:
|
|
9
9
|
|
|
10
10
|
1. Snapshots the current git `HEAD` into a throwaway temp directory (via
|
|
11
11
|
`git archive HEAD | tar -x`) — it never touches your working directory, staged, or
|
|
12
12
|
uncommitted changes.
|
|
13
13
|
2. Copies `agent_prompt.md`, `solution.patch`, and `test.patch` from your project root into
|
|
14
14
|
that temp dir.
|
|
15
|
-
3. Optionally runs
|
|
16
|
-
meaningful prompt sentence, submitting positive and negative candidates for each; a strict
|
|
17
|
-
reviewer then filters the combined list for fair, public behavioral assertions.
|
|
18
|
-
4. Optionally runs the solver gap finder: several (configurable, default 3) TDD-style solver
|
|
15
|
+
3. Optionally runs the solver gap finder: several (configurable, default 3) TDD-style solver
|
|
19
16
|
agents, each in its own throwaway git repo with `test.patch` and `agent_prompt.md` applied
|
|
20
17
|
(never `solution.patch`), given write/edit/bash access to iterate until `./test.sh new`
|
|
21
|
-
passes or they give up. The extension independently re-verifies each
|
|
22
|
-
solver
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
5. Runs the solver workers in one AWS ECS Fargate Spot task (when the solver finder is enabled),
|
|
37
|
-
with the source snapshot and partial results in S3. A Spot interruption retries the task and
|
|
38
|
-
resumes solver indexes whose results were already uploaded; the final comparison still runs
|
|
39
|
-
locally.
|
|
40
|
-
6. Posts a chat summary and merges the gap-finder results into `shipd_report.json` in your
|
|
41
|
-
project root. Running either finder separately builds up one combined report without any
|
|
42
|
-
PASS/FAIL verdict.
|
|
18
|
+
passes or they give up. The extension independently re-verifies each solver's result and
|
|
19
|
+
compares passing solver diffs with the reference to surface behavioral gaps.
|
|
20
|
+
4. Runs solver workers in one AWS ECS Fargate Spot task when enabled, with the source snapshot
|
|
21
|
+
and partial results in S3. A Spot interruption retries the task and resumes completed
|
|
22
|
+
solver indexes.
|
|
23
|
+
5. Posts a chat summary and merges solver results into `shipd_report.json` in your project root.
|
|
24
|
+
|
|
25
|
+
The agent-callable `analyze_task_tests` tool provides the separate test-analysis workflow:
|
|
26
|
+
|
|
27
|
+
- `mode: "gaps"` (default) finds and validates sentence-by-sentence behavioral coverage gaps.
|
|
28
|
+
- `mode: "audit"` runs an auditor followed by an independent validator over implemented tests,
|
|
29
|
+
filtering unfair assertions, prompt ambiguity, weak assertions, and broken fixtures.
|
|
30
|
+
|
|
31
|
+
Both modes are read-only. Invoke the tool only when the user asks, never in parallel, and run
|
|
32
|
+
repeated requests sequentially after applying each result.
|
|
43
33
|
|
|
44
34
|
## Commands
|
|
45
35
|
|
|
46
|
-
|
|
36
|
+
`--config` must be used alone; solver-gap-finder is the only `/checks` run mode.
|
|
47
37
|
|
|
48
38
|
| Command | Effect |
|
|
49
39
|
|---|---|
|
|
50
|
-
| `/checks` | Open a menu with config
|
|
51
|
-
| `/checks --config` | Configure
|
|
40
|
+
| `/checks` | Open a menu with config and solver-gap-finder options |
|
|
41
|
+
| `/checks --config` | Configure reviewer, solver, gap-finder, and test-audit models |
|
|
52
42
|
| `/checks --solver-gap-finder` | Run several solver agents TDD-style against `agent_prompt.md` + `test.patch`, then compare their solutions to the real solution to find gaps |
|
|
53
|
-
| `/
|
|
54
|
-
| `/analyze:
|
|
55
|
-
| `/analyze:off` | Disable the agent-callable Gap Finder tool for the current project |
|
|
43
|
+
| `/analyze:on` | Enable the agent-callable test-analysis tool for the current project |
|
|
44
|
+
| `/analyze:off` | Disable the agent-callable test-analysis tool for the current project |
|
|
56
45
|
|
|
57
46
|
**Shortcut:** `Ctrl+Shift+X` cancels an in-progress `/checks` run. Cancellation is propagated to active solver sessions and their spawned shell/test process trees; post-cancel verification, comparison, and artifact writing are skipped.
|
|
58
47
|
|
|
@@ -64,7 +53,7 @@ The two finder flags are additive/combinable; `--config` must be used alone.
|
|
|
64
53
|
solver-solution comparison agent.
|
|
65
54
|
- **Solver**: model and thinking level for TDD solver agents, plus their timeout, parallel solver
|
|
66
55
|
count, and artifact-saving setting.
|
|
67
|
-
- **Analyze Tool**: pick
|
|
56
|
+
- **Analyze Tool**: pick separate models + thinking levels for the agent-callable gap-analysis and Test Audit modes. The audit model defaults to the gap-analysis model until explicitly changed. These are stored under `analyzeGap.testAuditProvider`, `analyzeGap.testAuditModelId`, and `analyzeGap.testAuditThinkingLevel`.
|
|
68
57
|
- **Fargate**: choose the shared-task resource profile for the current project: `small` (1 vCPU,
|
|
69
58
|
2 GB), `medium` (2 vCPU, 4 GB), or `large` (4 vCPU, 8 GB). Adaptive sizing can select the
|
|
70
59
|
next profile from task telemetry after each run.
|
|
@@ -137,8 +126,9 @@ On-Demand fallback. Spot interruptions are retried according to `fargate.maxRetr
|
|
|
137
126
|
`cluster`, `subnetIds`, and `securityGroupId` are optional when a default VPC is available.
|
|
138
127
|
With `adaptiveResourceProfile: true`, the first run uses `resourceProfile`; later runs upgrade
|
|
139
128
|
when normalized CPU is at least 90% for more than three minutes, downgrade when CPU is at
|
|
140
|
-
least 95% for under one minute, and otherwise retain the profile.
|
|
141
|
-
`projectProfiles
|
|
129
|
+
least 95% for under one minute, and otherwise retain the profile. Only the selected next
|
|
130
|
+
profile is written to `projectProfiles`; CPU telemetry is included in `shipd_report.json` but
|
|
131
|
+
no telemetry history is retained. Set `projectProfiles` to override resources per repository:
|
|
142
132
|
`{"C:/path/to/repo":"large"}`.
|
|
143
133
|
|
|
144
134
|
5. Restart pi, use `/checks --config` to select the solver model and project resource profile,
|
|
@@ -146,7 +136,12 @@ On-Demand fallback. Spot interruptions are retried according to `fargate.maxRetr
|
|
|
146
136
|
`solution.patch`, `test.patch`, and `test.sh`.
|
|
147
137
|
|
|
148
138
|
Use `/analyze:on` and `/analyze:off` to control the tool per project, like HPC. The enabled project
|
|
149
|
-
list is stored alongside the other settings in `~/.pi/agent/checks-config.json
|
|
139
|
+
list is stored alongside the other settings in `~/.pi/agent/checks-config.json`.
|
|
140
|
+
|
|
141
|
+
The agent-callable tool accepts `mode: "gaps"` (default) or `mode: "audit"`. Invoke it only when the
|
|
142
|
+
user asks, never in parallel, and run repeated requests sequentially after applying each result.
|
|
143
|
+
The audit is read-only and returns repair recommendations; the caller changes the tests or prompt.
|
|
144
|
+
|
|
150
145
|
|
|
151
146
|
```json
|
|
152
147
|
{
|