@tiphys/kernel 0.0.0 → 0.2.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/AGENTS.md +663 -0
- package/LICENSE +202 -0
- package/assurance-modes.yaml +299 -0
- package/checklists/clean-room.yaml +325 -0
- package/checklists/env-failure-diagnosis.yaml +68 -0
- package/checklists/flake-playbook.yaml +68 -0
- package/checklists/hazard-review.yaml +144 -0
- package/checklists/plan-review.yaml +103 -0
- package/dist/bin/tiphys.d.ts +2 -0
- package/dist/bin/tiphys.js +92 -0
- package/dist/src/adapters/load.d.ts +202 -0
- package/dist/src/adapters/load.js +440 -0
- package/dist/src/brief.d.ts +32 -0
- package/dist/src/brief.js +66 -0
- package/dist/src/checklists.d.ts +169 -0
- package/dist/src/checklists.js +310 -0
- package/dist/src/checks.d.ts +1539 -0
- package/dist/src/checks.js +5025 -0
- package/dist/src/cli.d.ts +9 -0
- package/dist/src/cli.js +68 -0
- package/dist/src/commands/brief.d.ts +92 -0
- package/dist/src/commands/brief.js +343 -0
- package/dist/src/commands/checklist.d.ts +42 -0
- package/dist/src/commands/checklist.js +168 -0
- package/dist/src/commands/cutover.d.ts +35 -0
- package/dist/src/commands/cutover.js +448 -0
- package/dist/src/commands/doctor.d.ts +264 -0
- package/dist/src/commands/doctor.js +1546 -0
- package/dist/src/commands/gates.d.ts +9 -0
- package/dist/src/commands/gates.js +360 -0
- package/dist/src/commands/init.d.ts +30 -0
- package/dist/src/commands/init.js +177 -0
- package/dist/src/commands/lock.d.ts +34 -0
- package/dist/src/commands/lock.js +340 -0
- package/dist/src/commands/mode.d.ts +40 -0
- package/dist/src/commands/mode.js +134 -0
- package/dist/src/commands/next.d.ts +130 -0
- package/dist/src/commands/next.js +597 -0
- package/dist/src/commands/plan.d.ts +20 -0
- package/dist/src/commands/plan.js +105 -0
- package/dist/src/commands/pool.d.ts +1 -0
- package/dist/src/commands/pool.js +139 -0
- package/dist/src/commands/resume.d.ts +1 -0
- package/dist/src/commands/resume.js +88 -0
- package/dist/src/commands/spawn.d.ts +1 -0
- package/dist/src/commands/spawn.js +195 -0
- package/dist/src/commands/status.d.ts +21 -0
- package/dist/src/commands/status.js +122 -0
- package/dist/src/commands/sync.d.ts +47 -0
- package/dist/src/commands/sync.js +341 -0
- package/dist/src/commands/teardown.d.ts +1 -0
- package/dist/src/commands/teardown.js +87 -0
- package/dist/src/commands/tuition.d.ts +21 -0
- package/dist/src/commands/tuition.js +218 -0
- package/dist/src/commands/validate.d.ts +78 -0
- package/dist/src/commands/validate.js +430 -0
- package/dist/src/commands/watch.d.ts +1 -0
- package/dist/src/commands/watch.js +172 -0
- package/dist/src/cutover.d.ts +584 -0
- package/dist/src/cutover.js +1444 -0
- package/dist/src/exclusion.d.ts +389 -0
- package/dist/src/exclusion.js +843 -0
- package/dist/src/exec/env.d.ts +278 -0
- package/dist/src/exec/env.js +334 -0
- package/dist/src/fleet.d.ts +223 -0
- package/dist/src/fleet.js +298 -0
- package/dist/src/gates/adapters/http-json.d.ts +5 -0
- package/dist/src/gates/adapters/http-json.js +283 -0
- package/dist/src/gates/adapters/migrations-command.d.ts +1 -0
- package/dist/src/gates/adapters/migrations-command.js +373 -0
- package/dist/src/gates/citations.d.ts +408 -0
- package/dist/src/gates/citations.js +1169 -0
- package/dist/src/gates/coverage.d.ts +375 -0
- package/dist/src/gates/coverage.js +836 -0
- package/dist/src/gates/credentials.d.ts +233 -0
- package/dist/src/gates/credentials.js +752 -0
- package/dist/src/gates/deploy.d.ts +1 -0
- package/dist/src/gates/deploy.js +33 -0
- package/dist/src/gates/gate-classes.d.ts +56 -0
- package/dist/src/gates/gate-classes.js +633 -0
- package/dist/src/gates/manifest.d.ts +99 -0
- package/dist/src/gates/manifest.js +208 -0
- package/dist/src/gates/merge-preconditions.d.ts +319 -0
- package/dist/src/gates/merge-preconditions.js +932 -0
- package/dist/src/gates/migrations.d.ts +1 -0
- package/dist/src/gates/migrations.js +36 -0
- package/dist/src/gates/pin.d.ts +114 -0
- package/dist/src/gates/pin.js +154 -0
- package/dist/src/gates/red-witness.d.ts +22 -0
- package/dist/src/gates/red-witness.js +482 -0
- package/dist/src/gates/release.d.ts +283 -0
- package/dist/src/gates/release.js +820 -0
- package/dist/src/gates/result.d.ts +116 -0
- package/dist/src/gates/result.js +91 -0
- package/dist/src/gates/run.d.ts +614 -0
- package/dist/src/gates/run.js +1614 -0
- package/dist/src/gates/schemas/citation-config.schema.json +59 -0
- package/dist/src/gates/schemas/coverage-config.schema.json +77 -0
- package/dist/src/gates/schemas/gate-manifest.schema.json +125 -0
- package/dist/src/gates/schemas/gate-result.schema.json +160 -0
- package/dist/src/gates/schemas/phase-declaration.schema.json +87 -0
- package/dist/src/gates/schemas/release-record.schema.json +119 -0
- package/dist/src/gates/schemas/verifier-config.schema.json +101 -0
- package/dist/src/gates/schemas/witness-spec.schema.json +110 -0
- package/dist/src/gates/scope.d.ts +131 -0
- package/dist/src/gates/scope.js +1018 -0
- package/dist/src/gates/suite.d.ts +217 -0
- package/dist/src/gates/suite.js +968 -0
- package/dist/src/gates/validate.d.ts +121 -0
- package/dist/src/gates/validate.js +414 -0
- package/dist/src/hooks.d.ts +84 -0
- package/dist/src/hooks.js +125 -0
- package/dist/src/index.d.ts +31 -0
- package/dist/src/index.js +30 -0
- package/dist/src/liveness.d.ts +321 -0
- package/dist/src/liveness.js +396 -0
- package/dist/src/lock.d.ts +256 -0
- package/dist/src/lock.js +792 -0
- package/dist/src/model-resolution.d.ts +159 -0
- package/dist/src/model-resolution.js +307 -0
- package/dist/src/modes.d.ts +149 -0
- package/dist/src/modes.js +258 -0
- package/dist/src/path-identity.d.ts +34 -0
- package/dist/src/path-identity.js +48 -0
- package/dist/src/plan.d.ts +73 -0
- package/dist/src/plan.js +153 -0
- package/dist/src/pool.d.ts +326 -0
- package/dist/src/pool.js +988 -0
- package/dist/src/roles.d.ts +461 -0
- package/dist/src/roles.js +776 -0
- package/dist/src/spawn.d.ts +482 -0
- package/dist/src/spawn.js +1003 -0
- package/dist/src/status.d.ts +116 -0
- package/dist/src/status.js +148 -0
- package/dist/src/task.d.ts +504 -0
- package/dist/src/task.js +307 -0
- package/dist/src/teardown.d.ts +39 -0
- package/dist/src/teardown.js +422 -0
- package/dist/src/tuition.d.ts +159 -0
- package/dist/src/tuition.js +311 -0
- package/dist/src/validate.d.ts +263 -0
- package/dist/src/validate.js +742 -0
- package/dist/src/version.d.ts +3 -0
- package/dist/src/version.js +38 -0
- package/dist/src/watcher.d.ts +275 -0
- package/dist/src/watcher.js +849 -0
- package/dist/src/witness/run.d.ts +299 -0
- package/dist/src/witness/run.js +1373 -0
- package/dist/src/witness/spec.d.ts +270 -0
- package/dist/src/witness/spec.js +475 -0
- package/dist/tsconfig.src.tsbuildinfo +1 -0
- package/gate-registry.yaml +526 -0
- package/gates.manifest.json +257 -0
- package/package.json +72 -3
- package/role-model-config.yaml +88 -0
- package/roles/README.md +128 -0
- package/roles/_shared-dispatch-contract.md +87 -0
- package/roles/adversarial-plan-reviewer.md +80 -0
- package/roles/clean-room-reviewer.md +140 -0
- package/roles/implementer.md +463 -0
- package/roles/investigator.md +138 -0
- package/roles/plan-writer.md +95 -0
- package/schemas/README.md +82 -0
- package/schemas/assurance-modes.schema.json +264 -0
- package/schemas/charter.schema.json +185 -0
- package/schemas/checklist.schema.json +114 -0
- package/schemas/cutover-state.schema.json +64 -0
- package/schemas/decision-record.schema.json +88 -0
- package/schemas/executor-record.schema.json +36 -0
- package/schemas/final-report.schema.json +90 -0
- package/schemas/finding.schema.json +106 -0
- package/schemas/gate-registry.schema.json +260 -0
- package/schemas/mechanism-index.schema.json +94 -0
- package/schemas/model-resolution.schema.json +362 -0
- package/schemas/plan.schema.json +300 -0
- package/schemas/report.schema.json +579 -0
- package/schemas/role-brief.schema.json +105 -0
- package/schemas/role-model-config.schema.json +90 -0
- package/schemas/status-line.schema.json +40 -0
- package/schemas/tuition.schema.json +191 -0
- package/schemas/verdict.schema.json +295 -0
- package/schemas/work-history.schema.json +183 -0
- package/schemas/write-bypass.schema.json +69 -0
- package/templates/charter.example.yaml +54 -0
- package/templates/decision-record.example.yaml +27 -0
- package/templates/final-report.example.yaml +80 -0
- package/templates/plan.example.yaml +87 -0
- package/templates/report.example.yaml +236 -0
- package/templates/warnings.md +74 -0
- package/templates/work-history.example.yaml +185 -0
- package/tuition/README.md +76 -0
- package/tuition/T-001.yaml +48 -0
- package/tuition/T-002.yaml +51 -0
- package/tuition/T-003.yaml +100 -0
- package/tuition/T-004.yaml +52 -0
- package/tuition/T-005.yaml +72 -0
- package/tuition/T-006.yaml +81 -0
- package/tuition/T-007.yaml +56 -0
- package/tuition/T-008.yaml +111 -0
- package/tuition/T-009.yaml +50 -0
- package/tuition/T-015.yaml +36 -0
- package/tuition/T-016.yaml +36 -0
- package/tuition/T-017.yaml +46 -0
- package/tuition/T-018.yaml +84 -0
- package/tuition/T-021.yaml +40 -0
- package/tuition/T-022.yaml +36 -0
- package/tuition/mechanism-index.yaml +256 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# A minimal Tiphys decision record that validates against
|
|
2
|
+
# schemas/decision-record.schema.json. Kernel plan M3, M3-P1 step 7.
|
|
3
|
+
kind: decision-record
|
|
4
|
+
id: DR-0021
|
|
5
|
+
project: example-service
|
|
6
|
+
task: m9-planning
|
|
7
|
+
question: >-
|
|
8
|
+
Does the importer retry a 429, and if so how many times, given that the
|
|
9
|
+
caller already retries at job level?
|
|
10
|
+
options:
|
|
11
|
+
- label: Retry twice inside the importer
|
|
12
|
+
consequence: >-
|
|
13
|
+
Bounded total attempts at six when multiplied by the caller's three, and
|
|
14
|
+
the failure surfaces within one job.
|
|
15
|
+
- label: Do not retry inside the importer
|
|
16
|
+
consequence: >-
|
|
17
|
+
One rate-limited response fails the whole job, and the caller's retry
|
|
18
|
+
re-reads the entire catalogue.
|
|
19
|
+
reversibility: reversible
|
|
20
|
+
vetoable: false
|
|
21
|
+
revert-cost: >-
|
|
22
|
+
One constant and one test; the change is behind no data migration.
|
|
23
|
+
status: decided
|
|
24
|
+
decided: Retry twice inside the importer (owner, 2026-08-08).
|
|
25
|
+
date: 2026-08-08
|
|
26
|
+
evidence:
|
|
27
|
+
- delivery/verification/importer-retry.md
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Tiphys final report, worked example.
|
|
2
|
+
#
|
|
3
|
+
# FILLED WITH REAL CONTENT FROM THIS REPOSITORY (kernel plan M3, M3-P4 step 4).
|
|
4
|
+
# The findings below are the six the M3-P3 round-8 adversarial verification
|
|
5
|
+
# raised, with the outcomes that verification recorded, at
|
|
6
|
+
# delivery/review/verification-m3-p3-round-8.md:766.
|
|
7
|
+
#
|
|
8
|
+
# THE FINAL REPORT IS A PROJECTION, NOT A SUMMARY. Nothing here is authored:
|
|
9
|
+
# every row is derived from a record that already exists, which is why the
|
|
10
|
+
# document can be dense while the archive stays verbose.
|
|
11
|
+
|
|
12
|
+
kind: final-report
|
|
13
|
+
subject: M3-P3, assurance modes and role-to-model configuration, rounds 1 to 10
|
|
14
|
+
|
|
15
|
+
inputs:
|
|
16
|
+
- V-1
|
|
17
|
+
- V-2
|
|
18
|
+
- V-3
|
|
19
|
+
- V-4
|
|
20
|
+
- V-5
|
|
21
|
+
- V-6
|
|
22
|
+
|
|
23
|
+
input-findings:
|
|
24
|
+
- id: V-1
|
|
25
|
+
outcome: >-
|
|
26
|
+
CLOSED. 128 runs through the shipped CLI with byte-identical output,
|
|
27
|
+
flat growth to 3584 markers, a 23.4M-string language equivalence, and a
|
|
28
|
+
time witness red 2 of 2 on both members and green with 58x headroom.
|
|
29
|
+
- id: V-2
|
|
30
|
+
outcome: >-
|
|
31
|
+
CLOSED. The {0,2}, {0,3} and {0,4} mutants and three loop-bound mutants
|
|
32
|
+
were all killed; name, description, spec and fixture agree. Residual
|
|
33
|
+
W-3 is LOW.
|
|
34
|
+
- id: V-3
|
|
35
|
+
outcome: CLOSED. The replacement member reddens one test out of 505, was fourteen.
|
|
36
|
+
- id: V-4
|
|
37
|
+
outcome: CLOSED. Both sweeps re-run by the reviewer; exit codes and hits reproduce exactly.
|
|
38
|
+
- id: V-5
|
|
39
|
+
outcome: >-
|
|
40
|
+
OUT OF SCOPE by orchestrator decision in
|
|
41
|
+
delivery/review/arbitration-m3-p3-round-8.md; not re-measured and no
|
|
42
|
+
claim made.
|
|
43
|
+
- id: V-6
|
|
44
|
+
outcome: >-
|
|
45
|
+
CLOSED BY REMOVAL. git grep for both constants outside delivery/
|
|
46
|
+
returns nothing at exit 1, and the derivation is stated in the true
|
|
47
|
+
form rather than as an impossibility.
|
|
48
|
+
|
|
49
|
+
decisions-owed:
|
|
50
|
+
none: false
|
|
51
|
+
entries:
|
|
52
|
+
- id: todo-bucket
|
|
53
|
+
statement: >-
|
|
54
|
+
The report contract's gate-result count vocabulary has five fields and
|
|
55
|
+
the M2-P3 wrapper reports six buckets; a run with todo greater than
|
|
56
|
+
zero cannot be recorded without breaking parity. Whether to add the
|
|
57
|
+
field or to state the gap is a plan question, not an implementer one.
|
|
58
|
+
owner: orchestrator
|
|
59
|
+
|
|
60
|
+
owner-verification:
|
|
61
|
+
none: false
|
|
62
|
+
entries:
|
|
63
|
+
- id: A-4
|
|
64
|
+
statement: >-
|
|
65
|
+
The npm publish credential is an owner action; no agent in this
|
|
66
|
+
container holds it and no gate can stand in for it.
|
|
67
|
+
owner: owner
|
|
68
|
+
|
|
69
|
+
infrastructure-left:
|
|
70
|
+
none: true
|
|
71
|
+
|
|
72
|
+
out-of-band:
|
|
73
|
+
none: false
|
|
74
|
+
entries:
|
|
75
|
+
- id: beacon-branch-correction
|
|
76
|
+
statement: >-
|
|
77
|
+
The M3-P4 beacon commit landed on local main and was moved onto the
|
|
78
|
+
phase branch by the orchestrator with git branch -f; no file content
|
|
79
|
+
changed and nothing was pushed while HEAD was wrong.
|
|
80
|
+
owner: orchestrator
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# A minimal Tiphys delivery plan that validates against schemas/plan.schema.json.
|
|
2
|
+
# Kernel plan M3, M3-P1 step 7. It is a TEACHING instance: every required
|
|
3
|
+
# field is present and carries a realistic value, so a plan writer copying it
|
|
4
|
+
# starts from a shape the validator accepts.
|
|
5
|
+
kind: plan
|
|
6
|
+
status: approved
|
|
7
|
+
baseline-commit: be84c6d
|
|
8
|
+
binding-rule: >-
|
|
9
|
+
If it is not written here, it is not being made. Unanswered questions go to
|
|
10
|
+
the orchestrator.
|
|
11
|
+
process-summary: >-
|
|
12
|
+
Orchestrated delivery: verified plan, adversarial plan review, one phase per
|
|
13
|
+
branch, clean-room review before merge, milestone exit tests as hard gates.
|
|
14
|
+
standing-context: |
|
|
15
|
+
What previous runs bought: the fleet layout, the lease lock, the watcher and
|
|
16
|
+
the gate contract. What is already fixed: nothing ships without a red
|
|
17
|
+
witness. Deploy state: none, this is a library.
|
|
18
|
+
report-code-disagreement:
|
|
19
|
+
- phase: M9-P1
|
|
20
|
+
claim: the report says the importer retries on a 429, and the code does not
|
|
21
|
+
verified: false
|
|
22
|
+
phases:
|
|
23
|
+
- id: M9-P1
|
|
24
|
+
branch: claude/m9-p1-importer-retry
|
|
25
|
+
intent: Make the importer's retry behaviour match what the report claims.
|
|
26
|
+
grounding: >-
|
|
27
|
+
The importer is on main at be84c6d and has one call site. The report's
|
|
28
|
+
retry claim has not been confirmed against it.
|
|
29
|
+
severity: high
|
|
30
|
+
verified-root-cause: >-
|
|
31
|
+
To be established by step 1, which is why step 1 is verification-first
|
|
32
|
+
and the fill-in below is unfilled.
|
|
33
|
+
steps:
|
|
34
|
+
- kind: verification-first
|
|
35
|
+
text: >-
|
|
36
|
+
Confirm whether the importer retries a 429 at all, capture the
|
|
37
|
+
observed behaviour, and write it down before changing anything.
|
|
38
|
+
- text: Implement the retry the verification shows is missing.
|
|
39
|
+
files-to-touch:
|
|
40
|
+
- src/importer.ts
|
|
41
|
+
- test/importer.test.ts
|
|
42
|
+
- "`src/cli.ts` (edit only if step 4 requires it)"
|
|
43
|
+
extras:
|
|
44
|
+
- delivery/requirements/clause-map.json
|
|
45
|
+
acceptance:
|
|
46
|
+
- id: "1"
|
|
47
|
+
criterion: >-
|
|
48
|
+
node --test test/importer.test.ts exits 0 and reports 4 tests, 0
|
|
49
|
+
failing.
|
|
50
|
+
- id: "2"
|
|
51
|
+
criterion: >-
|
|
52
|
+
A staged 429 response is retried exactly twice and the third failure
|
|
53
|
+
propagates, asserted against captured server output.
|
|
54
|
+
hazard-classes:
|
|
55
|
+
- id: H1
|
|
56
|
+
statement: >-
|
|
57
|
+
A retry that masks a permanent failure, so a broken import reports
|
|
58
|
+
success after three attempts.
|
|
59
|
+
addressed-by: criterion 2
|
|
60
|
+
- id: H2
|
|
61
|
+
statement: >-
|
|
62
|
+
Retry storms under concurrent imports, which no state this milestone
|
|
63
|
+
reaches can produce.
|
|
64
|
+
addressed-by: "state-not-entered: M10"
|
|
65
|
+
migrations: none
|
|
66
|
+
conflicts-with: []
|
|
67
|
+
parallelizable: false
|
|
68
|
+
citations:
|
|
69
|
+
- R-012
|
|
70
|
+
- T-003
|
|
71
|
+
fill-in:
|
|
72
|
+
filled: false
|
|
73
|
+
root-cause: ""
|
|
74
|
+
fix-shape: ""
|
|
75
|
+
files: []
|
|
76
|
+
decisions:
|
|
77
|
+
- id: D-1
|
|
78
|
+
statement: >-
|
|
79
|
+
The retry count is two rather than five, because the importer's caller
|
|
80
|
+
already has a job-level retry and five would multiply to twenty-five.
|
|
81
|
+
open-questions:
|
|
82
|
+
- DR-0021
|
|
83
|
+
parked:
|
|
84
|
+
- item: A circuit breaker in front of the importer.
|
|
85
|
+
reason: >-
|
|
86
|
+
No measured instance of the failure it prevents; building it now is the
|
|
87
|
+
shape risk 1 exists to stop.
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Tiphys report, worked example.
|
|
2
|
+
#
|
|
3
|
+
# FILLED WITH REAL CONTENT FROM THIS REPOSITORY, not with placeholders
|
|
4
|
+
# (kernel plan M3, M3-P4 step 4 and the hazard row on authoring cost). The
|
|
5
|
+
# hazard this phase cannot test is that an honest record might be more
|
|
6
|
+
# expensive to write than a dishonest one; nothing here measures that ratio,
|
|
7
|
+
# and the only thing the plan can do about it is pay the cost of one honest
|
|
8
|
+
# record once, in the open, so a reader can see what it costs. This is that
|
|
9
|
+
# record. Every command quoted below was run, and every exit code is the one
|
|
10
|
+
# it returned.
|
|
11
|
+
|
|
12
|
+
kind: report
|
|
13
|
+
role: implementer
|
|
14
|
+
task: >-
|
|
15
|
+
Deliver M3-P4: the report contract, the final-report shape, the work-history
|
|
16
|
+
contract and the environment-warnings template, so that every later role
|
|
17
|
+
brief has a validated output format to point at instead of describing one in
|
|
18
|
+
prose.
|
|
19
|
+
verdict: >-
|
|
20
|
+
Delivered on the branch, with two residues stated rather than closed and one
|
|
21
|
+
declared deviation from criterion 2(e)'s letter.
|
|
22
|
+
|
|
23
|
+
findings:
|
|
24
|
+
- id: VF-1
|
|
25
|
+
severity: high
|
|
26
|
+
source-pinned: true
|
|
27
|
+
pinned-evidence: origin/main at c7a7ce97e03fc0788c92b401de92f0f4a7b8ee0d
|
|
28
|
+
evidence:
|
|
29
|
+
- path: src/validate.ts
|
|
30
|
+
lines: "568"
|
|
31
|
+
note: >-
|
|
32
|
+
compileSchema built a fresh Ajv per document and registered nothing
|
|
33
|
+
beside it, so a reference leaving the document failed compilation.
|
|
34
|
+
- path: src/validate.ts
|
|
35
|
+
lines: "642"
|
|
36
|
+
note: >-
|
|
37
|
+
The reference is classified as remote or unresolved and either way
|
|
38
|
+
the compilation fails closed.
|
|
39
|
+
analysis: |
|
|
40
|
+
Plan step 3 requires the work-history schema to share the report
|
|
41
|
+
schema's claims and fix-round definitions by $ref rather than restating
|
|
42
|
+
them, and requires a registered test that both resolve to the same
|
|
43
|
+
definition object. As shipped at the merge base, no schema could reach
|
|
44
|
+
another document at all, so shipping the $ref without a change to the
|
|
45
|
+
compile path would have made `tiphys validate --type work-history` fail
|
|
46
|
+
on this phase's own example, which is acceptance criterion 1.
|
|
47
|
+
outcome: >-
|
|
48
|
+
Closed by a declared COMPANION_TABLE in src/commands/validate.ts and an
|
|
49
|
+
optional companions argument on compileSchema, so the set of documents a
|
|
50
|
+
schema may reach is declared in one auditable place rather than derived
|
|
51
|
+
from the reference.
|
|
52
|
+
|
|
53
|
+
- id: VF-2
|
|
54
|
+
severity: medium
|
|
55
|
+
source-pinned: false
|
|
56
|
+
evidence:
|
|
57
|
+
- path: src/gates/coverage.ts
|
|
58
|
+
lines: "599"
|
|
59
|
+
note: checkFindingOutcomeParity is an exported function.
|
|
60
|
+
- path: src/gates/coverage.ts
|
|
61
|
+
command: node src/gates/coverage.ts --help
|
|
62
|
+
exit-code: 64
|
|
63
|
+
note: >-
|
|
64
|
+
The gate CLI answers with its usage line, which accepts only
|
|
65
|
+
--result, --evidence and --config.
|
|
66
|
+
|
|
67
|
+
analysis: |
|
|
68
|
+
Acceptance criterion 4 asks for the M2-P6 coverage checker run in
|
|
69
|
+
finding-to-outcome parity mode against the final-report template, with
|
|
70
|
+
an exit code on both arms. The checker has no CLI flag that reaches that
|
|
71
|
+
mode, and src/gates/coverage.ts is not on this phase's declaration.
|
|
72
|
+
outcome: >-
|
|
73
|
+
Discharged by invoking the exported checker in a subprocess from the
|
|
74
|
+
registered test, so the exit code is a real process exit code and the
|
|
75
|
+
checker itself is unmodified.
|
|
76
|
+
|
|
77
|
+
- id: VF-3
|
|
78
|
+
severity: low
|
|
79
|
+
source-pinned: false
|
|
80
|
+
counter-experiment: >-
|
|
81
|
+
Removing minLength from the field and re-validating the whitespace-only
|
|
82
|
+
instance, which then passes, is the experiment that would falsify this.
|
|
83
|
+
evidence:
|
|
84
|
+
- path: schemas/report.schema.json
|
|
85
|
+
command: node bin/tiphys.ts validate --type report templates/report.example.yaml
|
|
86
|
+
exit-code: 0
|
|
87
|
+
analysis: |
|
|
88
|
+
Every field in these three schemas whose value is the point rather than
|
|
89
|
+
its presence carries minLength 1 and a non-whitespace pattern, because
|
|
90
|
+
required alone is satisfied by the empty string. The inventory of those
|
|
91
|
+
fields is written into the work history as a list, since which fields
|
|
92
|
+
were considered is a judgment made once at authoring time.
|
|
93
|
+
outcome: Closed; the field inventory is in delivery/work-history/m3-p4.md.
|
|
94
|
+
|
|
95
|
+
claims:
|
|
96
|
+
- id: C-1
|
|
97
|
+
kind: open-question
|
|
98
|
+
statement: >-
|
|
99
|
+
I did not find a way to make a gate result record a todo bucket without
|
|
100
|
+
breaking the parity rule, because the plan's five-field count vocabulary
|
|
101
|
+
has no field for it.
|
|
102
|
+
|
|
103
|
+
- id: C-2
|
|
104
|
+
kind: impossibility
|
|
105
|
+
statement: >-
|
|
106
|
+
A relative $ref into a sibling schema cannot be compiled by this
|
|
107
|
+
validator unless the caller registers that sibling as a companion.
|
|
108
|
+
settled-by:
|
|
109
|
+
executed-construction:
|
|
110
|
+
command: >-
|
|
111
|
+
node --input-type=module -e "import {compileSchema} from
|
|
112
|
+
'./src/validate.ts'; const s = JSON.parse(await
|
|
113
|
+
(await import('node:fs/promises')).readFile('schemas/work-history.schema.json','utf8'));
|
|
114
|
+
const r = compileSchema(s); console.log(r.ok ? 'compiled' : r.reason);"
|
|
115
|
+
exit-code: 0
|
|
116
|
+
output: |
|
|
117
|
+
INVALID # schema reference report.schema.json#/$defs/gateResult does not resolve
|
|
118
|
+
|
|
119
|
+
- id: C-3
|
|
120
|
+
kind: coverage
|
|
121
|
+
statement: >-
|
|
122
|
+
The derived check report-parity-arithmetic reddens on a gate result
|
|
123
|
+
whose sum exceeds discovered, and not only on one where discovered
|
|
124
|
+
exceeds the sum.
|
|
125
|
+
settled-by:
|
|
126
|
+
executed-construction:
|
|
127
|
+
command: node --test --test-name-pattern "parity" test/report-contract.test.ts
|
|
128
|
+
exit-code: 0
|
|
129
|
+
output: |
|
|
130
|
+
# tests 2
|
|
131
|
+
# suites 0
|
|
132
|
+
# pass 2
|
|
133
|
+
# fail 0
|
|
134
|
+
# cancelled 0
|
|
135
|
+
# skipped 0
|
|
136
|
+
# todo 0
|
|
137
|
+
|
|
138
|
+
- id: C-4
|
|
139
|
+
kind: remedy
|
|
140
|
+
statement: >-
|
|
141
|
+
Registering report.schema.json as a companion makes the work-history
|
|
142
|
+
schema compile and its example validate.
|
|
143
|
+
settled-by:
|
|
144
|
+
executed-construction:
|
|
145
|
+
command: node bin/tiphys.ts validate --type work-history templates/work-history.example.yaml
|
|
146
|
+
exit-code: 0
|
|
147
|
+
output: |
|
|
148
|
+
(no output; the command exits 0 with nothing on either stream)
|
|
149
|
+
|
|
150
|
+
- id: C-5
|
|
151
|
+
kind: universal
|
|
152
|
+
statement: >-
|
|
153
|
+
Every field in these schemas whose value carries the meaning has both
|
|
154
|
+
minLength and a non-whitespace pattern.
|
|
155
|
+
settled-by:
|
|
156
|
+
counter-experiment: >-
|
|
157
|
+
The falsifying experiment is a grep for minLength without an adjacent
|
|
158
|
+
pattern in the three schema documents; it is recorded with its output
|
|
159
|
+
in delivery/work-history/m3-p4.md.
|
|
160
|
+
|
|
161
|
+
fix-round:
|
|
162
|
+
mechanism: >-
|
|
163
|
+
A schema document compiled without the sibling documents its references
|
|
164
|
+
reach, so a reference that leaves the document fails closed at
|
|
165
|
+
compilation rather than resolving.
|
|
166
|
+
derivation:
|
|
167
|
+
command: "grep -rn 'compileSchema(\\|validateInstance(\\|validateToLines(' src/ bin/ | grep -v '^src/validate.ts:'"
|
|
168
|
+
output: |
|
|
169
|
+
src/gates/run.ts:361: const diagnostics = formatDiagnostics(validateInstance(schema, decoded.value));
|
|
170
|
+
src/gates/validate.ts:524: return validateInstance(schema, instance) as Diagnostic[];
|
|
171
|
+
src/gates/validate.ts:528:export function validateToLines(
|
|
172
|
+
src/commands/mode.ts:125: const lines = formatDiagnostics(validateInstance(loadTypeSchema(MODES_TYPE), read.raw));
|
|
173
|
+
src/commands/validate.ts:273: const diagnostics = validateInstance(
|
|
174
|
+
src/commands/status.ts:127: const diagnostics = validateInstance(loadTypeSchema("status-line"), record);
|
|
175
|
+
not-covered: >-
|
|
176
|
+
The search covered src/ and bin/ only. It did NOT cover test/, where the
|
|
177
|
+
same three functions are called through a computed dynamic import and a
|
|
178
|
+
literal grep for the call would find the import rather than the call; it
|
|
179
|
+
did not cover scripts/, which reaches the validator only through
|
|
180
|
+
src/gates/result.ts and never compiles a schema of its own; and it did not
|
|
181
|
+
cover dist/, which is generated and is never committed. The six sites
|
|
182
|
+
listed are the ones a companion-needing schema could reach today, and only
|
|
183
|
+
src/commands/validate.ts:273 was changed, because it is the only one that
|
|
184
|
+
resolves a type through the type table.
|
|
185
|
+
|
|
186
|
+
deviations:
|
|
187
|
+
- plan-clause: M3-P4 acceptance criterion 2(e)
|
|
188
|
+
why: >-
|
|
189
|
+
The criterion calls for an if/then over a pattern on the same object.
|
|
190
|
+
The finding object already spends its one if/then slot on T-004's
|
|
191
|
+
source-pinned coupling, allOf is outside the declared authoring
|
|
192
|
+
vocabulary, and two independent conditional rules cannot share one slot,
|
|
193
|
+
so the universal-quantifier rule is expressed as a two-branch oneOf. It
|
|
194
|
+
remains Kind A and its guarding keyword is witnessed by removal and
|
|
195
|
+
restoration.
|
|
196
|
+
|
|
197
|
+
honest-failures:
|
|
198
|
+
- cause: >-
|
|
199
|
+
The first copy of this phase's work history was created in the working
|
|
200
|
+
tree and not committed, and it disappeared within twenty-one minutes,
|
|
201
|
+
together with HEAD moving back to main.
|
|
202
|
+
exposure-window: >-
|
|
203
|
+
Twenty-one minutes, from the file's creation at 10:37 to the empty git
|
|
204
|
+
status at 10:58. Nothing was pushed in that window, so no branch outside
|
|
205
|
+
this container ever saw the misplaced commit.
|
|
206
|
+
structural-fix: >-
|
|
207
|
+
The beacon is committed in the same turn it is created, and the branch
|
|
208
|
+
is pushed early rather than at the end, so the beacon lives in git
|
|
209
|
+
rather than only in a working tree another process can reset.
|
|
210
|
+
|
|
211
|
+
environmental-claims:
|
|
212
|
+
- claim: >-
|
|
213
|
+
The build fails at build:runtime-deps on a checkout whose node_modules
|
|
214
|
+
predates M3-P3, because commonmark is a new dependency.
|
|
215
|
+
evidence:
|
|
216
|
+
- path: package.json
|
|
217
|
+
command: npm run build
|
|
218
|
+
exit-code: 1
|
|
219
|
+
note: >-
|
|
220
|
+
Error ENOENT no such file or directory, open
|
|
221
|
+
node_modules/commonmark/package.json
|
|
222
|
+
- path: package-lock.json
|
|
223
|
+
command: npm ci
|
|
224
|
+
exit-code: 0
|
|
225
|
+
note: After npm ci the same build command exits 0.
|
|
226
|
+
|
|
227
|
+
gate-results:
|
|
228
|
+
- gate: suite
|
|
229
|
+
result: green
|
|
230
|
+
wrapper-exit-code: 0
|
|
231
|
+
discovered: 507
|
|
232
|
+
passed: 505
|
|
233
|
+
failed: 0
|
|
234
|
+
skipped: 2
|
|
235
|
+
todo: 0
|
|
236
|
+
did-not-run: 0
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Environment warnings
|
|
2
|
+
|
|
3
|
+
This is R-083a's template half; its accumulation half is the work-history
|
|
4
|
+
schema's `environment-warnings[]`.
|
|
5
|
+
|
|
6
|
+
Place this file at the fleet root as `warnings.md`. `tiphys spawn` appends it
|
|
7
|
+
VERBATIM to every brief it assembles (`src/brief.ts`, R-083b), so what is
|
|
8
|
+
written here is what every agent reads. No heading is added, no banner, no
|
|
9
|
+
rewriting; the only byte the kernel may insert is one newline between the
|
|
10
|
+
brief and this file.
|
|
11
|
+
|
|
12
|
+
Markdown rather than YAML is a justified exception recorded in kernel plan M3
|
|
13
|
+
section 1.5: the only consumer appends it into instruction prose, so a
|
|
14
|
+
structured form would need a renderer whose sole output is the prose this file
|
|
15
|
+
already holds.
|
|
16
|
+
|
|
17
|
+
## What belongs here
|
|
18
|
+
|
|
19
|
+
One entry per environment fact that has already cost someone time. Each entry
|
|
20
|
+
states the fact, how it was MEASURED, and what to do instead. A warning with no
|
|
21
|
+
measurement behind it is a rumour, and a brief full of rumours is skimmed.
|
|
22
|
+
|
|
23
|
+
An entry is added the moment it is discovered, not at the end of a phase. The
|
|
24
|
+
matching field in the work-history contract is `environment-warnings[]`
|
|
25
|
+
(`schemas/work-history.schema.json`), which is the accumulation half of the
|
|
26
|
+
same requirement this template is the template half of.
|
|
27
|
+
|
|
28
|
+
## Entries, as they stand in this repository
|
|
29
|
+
|
|
30
|
+
These are real and are kept here as the worked example rather than as
|
|
31
|
+
placeholders. Replace them with your own project's; do not ship them unread.
|
|
32
|
+
|
|
33
|
+
1. **Several node versions may be installed and which one you get depends on
|
|
34
|
+
how the shell was started.** Measured: a login shell resolved `node` to
|
|
35
|
+
v22.22.2, and a stripped environment (`env -i bash -c`, and some subagent
|
|
36
|
+
and hook contexts) resolved it to v20.20.2. Node 20 has no TypeScript type
|
|
37
|
+
stripping, so a TypeScript test suite fails there in a way that does not
|
|
38
|
+
look like a version problem. Check `node --version` in the shell that
|
|
39
|
+
actually runs the command, and prefer an absolute path or an explicit PATH
|
|
40
|
+
prefix over trusting the ambient one.
|
|
41
|
+
|
|
42
|
+
2. **Running the suite without building first can silently skip tests while
|
|
43
|
+
still exiting 0.** Measured at one head on node v26.6.0: with `dist/` built,
|
|
44
|
+
504 tests, 504 pass, 0 skipped; with `dist/` removed, 504 tests, 495 pass,
|
|
45
|
+
9 skipped. Both runs exit 0. A skipped test is not a passing test, so quote
|
|
46
|
+
the SKIPPED count beside the pass count. The complete sentence names the
|
|
47
|
+
toolchain, the build state and the invocation, because the three axes skip
|
|
48
|
+
different tests and they compose.
|
|
49
|
+
|
|
50
|
+
3. **`git checkout --` is destructive in a tree holding uncommitted work,
|
|
51
|
+
including when it names a single path.** An implementer used it to clean up
|
|
52
|
+
one probe file and lost four rounds of uncommitted edits, having read a
|
|
53
|
+
warning about it beforehand. There is no safe narrow form: commit, or copy
|
|
54
|
+
out of the tree, before experimenting.
|
|
55
|
+
|
|
56
|
+
4. **A mutation harness killed by a timeout leaves the mutant installed.** A
|
|
57
|
+
modified source file is exactly what a mutation round expects to see, so the
|
|
58
|
+
one available signal is the one you have trained yourself to ignore. Restore
|
|
59
|
+
by copying from a pristine copy rather than from git, put the restore in a
|
|
60
|
+
shell `trap`, and print AND COMPARE a checksum on both sides.
|
|
61
|
+
|
|
62
|
+
5. **Concurrent git operations against one clone contend on ref locks**, and
|
|
63
|
+
the real transient message names a ref rather than a lock file. Never derive
|
|
64
|
+
a retry signature from a hand-written example; capture real stderr under
|
|
65
|
+
forced contention.
|
|
66
|
+
|
|
67
|
+
6. **A tool may be absent locally and present in CI.** Use a deterministic
|
|
68
|
+
PATH in tests rather than assuming either, and do not read an authenticated
|
|
69
|
+
API path and a git path as having the same authority: they can differ in one
|
|
70
|
+
container.
|
|
71
|
+
|
|
72
|
+
7. **Tests that create scratch git repositories must set command-scoped
|
|
73
|
+
`GIT_AUTHOR_*` and `GIT_COMMITTER_*`**, because CI runners have no git
|
|
74
|
+
identity, and must never touch user or global configuration.
|