Skip to content

docs(adr): ADR-0069 problem reports, schema frostyard.problem/1 and registry (T857 t1) - #196

Merged
bketelsen merged 3 commits into
mainfrom
lucilla/t857-problem-report-schema
Nov 5, 2026
Merged

bketelsen merged 3 commits into
mainfrom
lucilla/t857-problem-report-schema

Conversation

@frostyard-machines

@frostyard-machines frostyard-machines commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Plan T857 task t1 (approved rev 0b496c9, graph v2): the problem-report contract that t3, t5, t6, t15 and t18 build on.

  • ADR-0069 "Report problems local first, opt-in, with one sender per host": default off; local list first; one sender per host (chairlift on desktops, snosi-health on Floe); apps write only to the journal; no machine or boot ID; IP dropped at the edge; new field, kind or enum value = new schema version, Worker deploys first, senders map unknown open-enum values to other; raw under 90 days; aggregates only public; counts only from opted-in installs.
  • Schema docs/specs/schemas/problem-report/v1.json (frostyard.problem/1, draft 2020-12, $id https://frostyard.org/schemas/problem-report/v1.json): closed shape (additionalProperties: false on the envelope, image and every detail), kinds S1–S9 of plan section 1, the app_id allowlist, the component enum, anchored RE2/ECMA/Rust-portable patterns, no format. 1 example per kind in examples/.
  • Spec + registry docs/specs/problem-report.md: the envelope, each kind's fields, the fixed MESSAGE_ID 8915bdd215c84cbab0c31c05a1a33e7e, every FROSTYARD_* journal field and its report field, every enum (open or closed), and rules 1–11 (versions, deploy order, unknown values, untrusted records, consent, size).
  • Design docs/design/problem-reports.md: pieces and data flow.
  • Test test/problem-report-schema.test.mjs (runs in npm test, so in CI): validates 1 example per kind; rejects unknown fields (top level, detail, image, another kind's field), free-text values, bad version patterns, a bad schema, an off-list app_id, frames outside the allowed modules; checks every object is closed, every pattern anchored, no format; pins the sha256 of v1.json; checks that the spec names the MESSAGE_ID, every enum value and every app_id; checks the 8 KB size bound.

Choices made in this task (plan said "exact IDs fixed in t1")

  • App IDs are the identifiers each repository already uses (ADR-0016): org.frostyard.ChairLift, org.frostyard.nsl, org.frostyard.intuneme, org.frostyard.pilothouse, org.frostyard.Frostmail, org.frostyard.Frostnotes, org.frostyard.Frostread. intuneme and pilothouse use lowercase in their polkit and broker IDs today; nsl has none, so it follows them.
  • Envelope field schema (frostyard.problem/1) added so the Worker can select the version.
  • Go frames: the pattern allows only github.com/frostyard/…, the vendored github.com/emersion/go-imap/v2 fork (frostmail), the top-level Go standard library packages and main; no segment may hold a dot. Everything else is other.
  • Open vs closed enums: open enums carry other; closed ones (image.id, kind, app_id, runtime, class, buckets) make an unknown value local only. S3 how keeps the plan's unknown and adds other.
  • S4 error_class is optional (a skipped run has no error class). S8: code is required for class=error and forbidden for panic; frames is Go-panic only, location Rust-panic only.
  • Versions: <semver> allows only alpha/beta/rc prereleases and no v or build metadata; a dev build records locally only.

Decision trail

Plan T857 (Brian's decisions B1–B6 and asks T857a–g); consult k4 (Lucilla) conditions folded in: a new enum value is a new schema version, the Worker deploys before senders, senders map unknown values to other, exact app_id allowlist. Section 1 (inventory), 4 (placement) and 10 (ADRs) of the plan.

Risk tier

Risk tier: 1 — docs, a schema file and a test. No path in .github/risk-paths.json matches.

Docs housekeeping

  • New docs started from their category's TEMPLATE.md
  • Every new doc indexed in docs/README.md
  • Cross-links added in both directions (ADR ↔ design ↔ spec)
  • New significant decision recorded as an ADR first, in this PR
  • New/edited ADRs are fact-only
  • Conformance aliases (ADR-0029) untouched

Verification

  • npm run verify green locally (266 tests; check:docs included)
  • Revert test: in a scratch worktree at the PR head, loosening v1.json (top-level additionalProperties: true, the old loose frame pattern) and running node --test test/problem-report-schema.test.mjs fails 8 tests: v1.json matches its sha256 pin, every object schema with properties is closed, rejects an unknown top-level field, rejects a Go frame from a module off the allowlist, … with a dot-dot segment, … with a mixed-case path after a standard library package, … of a module that only starts like frostyard. Worktree removed.

Coder: github-copilot/claude-opus-5.5 (Lucilla wrote the ADR, spec and schema; a subagent of the same family wrote the examples and the test).

Cross-review

Reviewer openai/gpt-6.1-sol, coder github-copilot/claude-opus-5.5. Base d502e0eb5e7536881c70784541f68f6916e136ab.

  • Initial review at 8f776a1: Not ready, 3 blocking. (1) Rust location had no length bound → maxLength: 128, size and boundary tests. (2) Claimed ECMA $ matches before a final newline → disputed with evidence (JS, RE2 and Rust $ are end of input without flags); the reviewer withdrew it; spec rule 8 and 2 trailing-newline tests added anyway. (3) A token pattern cannot prove a frame is a real symbol → the spec states the residual (fmt/home/brian/documents/taxes.x) and the writer's guarantee. (4, low) Count unit clarified in ADR-0069.
  • Re-review 1 at ef36173: Ready, 1 non-blocking point (corrections line) → added.
  • Re-review 2 at 790e89b: Ready, Blocking: none.

Guard for the blockers: the new tests in test/problem-report-schema.test.mjs and 1 line in .memory/corrections.jsonl. npm run verify: 271 tests pass. CI green at 790e89b.

…egistry (T857 t1)

Add ADR-0069 (local first, opt-in, one sender per host), the spec
docs/specs/problem-report.md with the fixed MESSAGE_ID and the
FROSTYARD_* field and enum registry, the JSON Schema v1.json with 1
example per kind, a design doc, and test/problem-report-schema.test.mjs.
…arify counts (T857 t1)

Cross-review findings: location gets maxLength 128 with size and
boundary tests; the spec states that $ is end of input with no flags
(trailing newline tests) and the residual risk of token-shaped frames;
ADR-0069 says each opted-in sender sends at most 1 count a week.
@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 5, 2026
@bketelsen
bketelsen merged commit f1b62e0 into main Nov 5, 2026
5 checks passed
@bketelsen
bketelsen deleted the lucilla/t857-problem-report-schema branch November 5, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants