doctor: repair the file so just can load it, and fix the fastlane guard #93

Merged
larandar merged 1 commit from tango/92-doctor-just-unparseable into fastlane 2026-08-27 11:20:51 +00:00
Owner

.doctor.just on fastlane does not parse, so no repository in the estate has a working doctor. Full evidence and provenance in #92.

What changed

The file loads again. environment and openspec-reference were each defined twice — two doctor generations merged into one file — and just refuses the whole file on the first duplicate without reaching a recipe body. The older copy of each is deleted:

  • environment — dropped the form that writes a bare use flake and hard-errors on an inactive direnv; kept 4e573fe's, which ensures the managed bootstrap header and continues diagnostics.
  • openspec-reference — dropped the ting_store_id/ting_store_remote form; kept d01076a's, which derives the store from the repository basename and runs the full openspec store setup reconciliation.

ting_store_id, ting_store_remote, and wiki_store_id go with it — only the deleted recipe read them. The surviving recipes are unchanged, verbatim.

The fastlane seam guard now fires. Its first match arm tested $carried.exit_code != 0, but jj log over a revset matching nothing exits 0 and prints nothing, so the arm was dead and the seam was installed in every repository regardless of whether the forge carries a fastlane bookmark — the opposite of what the recipe's header scopes it to. It now tests empty stdout, which is what default-branch already does with the identical call. Comment added recording the trap.

Verification

  • just --unstable -f .doctor.just --list succeeds and lists adopt, default, doctor, wire. At 20c7398c it fails outright.
  • All 13 [script] bodies extracted and run through nu --ide-check and a parse-time deprecation probe under Nushell 0.114.1: no parse errors, no deprecation warnings. The probe method was sanity-checked against a known str upcase deprecation.
  • jj log exit-code behaviour confirmed directly against this repository before changing the guard.

Not in this PR

Idiomaticity findings from the same review — triplicated jj git remote list parsing that indexes $p.0/$p.1 rather than using parse, the unguarded .git/info/exclude read, sync's O(n²) line diff, governance's bare relative AGENTS.md — and the NU_FORCE_FORMAT question (the export is right for the set shell path, but only [script] recipes exist here, so display_output never fires and check's table will not round-trip through from ndnuon). Real, none load-bearing, each a decision of its own.

Attribution

Opened by agent.odin. The commit carries the freeholder's local identity ([email protected]) with a Co-Authored-By trailer, because the edits were made directly in the shared local checkout before the work was placed on a branch, rather than in a bounded tango workspace.

Closes #92

`.doctor.just` on `fastlane` does not parse, so no repository in the estate has a working doctor. Full evidence and provenance in #92. ## What changed **The file loads again.** `environment` and `openspec-reference` were each defined twice — two doctor generations merged into one file — and `just` refuses the whole file on the first duplicate without reaching a recipe body. The older copy of each is deleted: - `environment` — dropped the form that writes a bare `use flake` and hard-errors on an inactive direnv; kept 4e573fe's, which ensures the managed bootstrap header and continues diagnostics. - `openspec-reference` — dropped the `ting_store_id`/`ting_store_remote` form; kept d01076a's, which derives the store from the repository basename and runs the full `openspec store setup` reconciliation. `ting_store_id`, `ting_store_remote`, and `wiki_store_id` go with it — only the deleted recipe read them. The surviving recipes are unchanged, verbatim. **The `fastlane` seam guard now fires.** Its first match arm tested `$carried.exit_code != 0`, but `jj log` over a revset matching nothing exits 0 and prints nothing, so the arm was dead and the seam was installed in every repository regardless of whether the forge carries a `fastlane` bookmark — the opposite of what the recipe's header scopes it to. It now tests empty stdout, which is what `default-branch` already does with the identical call. Comment added recording the trap. ## Verification - `just --unstable -f .doctor.just --list` succeeds and lists `adopt`, `default`, `doctor`, `wire`. At `20c7398c` it fails outright. - All 13 `[script]` bodies extracted and run through `nu --ide-check` and a parse-time deprecation probe under Nushell 0.114.1: no parse errors, no deprecation warnings. The probe method was sanity-checked against a known `str upcase` deprecation. - `jj log` exit-code behaviour confirmed directly against this repository before changing the guard. ## Not in this PR Idiomaticity findings from the same review — triplicated `jj git remote list` parsing that indexes `$p.0`/`$p.1` rather than using `parse`, the unguarded `.git/info/exclude` read, `sync`'s O(n²) line diff, `governance`'s bare relative `AGENTS.md` — and the `NU_FORCE_FORMAT` question (the export is right for the `set shell` path, but only `[script]` recipes exist here, so `display_output` never fires and `check`'s table will not round-trip through `from ndnuon`). Real, none load-bearing, each a decision of its own. ## Attribution Opened by `agent.odin`. The commit carries the freeholder's local identity (`[email protected]`) with a `Co-Authored-By` trailer, because the edits were made directly in the shared local checkout before the work was placed on a branch, rather than in a bounded tango workspace. Closes #92
.doctor.just did not parse. It was a bad merge of two doctor generations:
`environment` and `openspec-reference` were each defined twice, so `just`
refused the file outright (`recipe `environment` first defined on line 170
is redefined on line 464`) and no recipe in it had been runnable — not
`doctor`, not `sync`, not the self-distribution the header describes.

Drop the older copy of each: the `environment` that writes a bare `use
flake` and hard-errors, and the `openspec-reference` built on
`ting_store_id`/`ting_store_remote`. What survives is the pair added by
4e573fe and d01076a — the .envrc bootstrap header, and the
basename-derived store with full `openspec store setup` reconciliation.
The three variables only the deleted recipe read go with it.

Separately, `fastlane`'s first match arm was dead. `jj log` over a revset
that matches nothing exits 0 and prints nothing, so `$carried.exit_code
!= 0` never fired and the seam was installed in every repo, fastlane
bookmark or not — the opposite of what the header scopes it to. Test
empty stdout instead, which is what `default-branch` already does with
the identical call.

All 13 script bodies re-checked under nu 0.114.1: no parse errors, no
deprecation warnings.

Co-Authored-By: Claude Opus 5 <[email protected]>
larandar merged commit 9180f5375b into fastlane 2026-08-27 11:20:51 +00:00
larandar deleted branch tango/92-doctor-just-unparseable 2026-08-27 11:20:51 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Ting/Jostoph!93
No description provided.