Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ jobs:
go test ./internal/manual/
go test -run 'Manual' ./internal/tui3/ ./internal/session/

- name: Carried program help fits eighty columns
run: make test-carried-help

# THE LAWS HOLD. Every test that reads the tree itself — the endings
# ratchet, the guard, the taxonomy, the words the e2e suite waits for —
# found by what it does (scripts/laws.sh) and run as one target, about
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# anywhere else — so a stale copy can't shadow a fresh one.
BINARY := bin/codeaf

.PHONY: all build build-check build-cross debug demo-home clean-run embed manual-pack-law furrow test test-focus test-report test-quick test-tooling test-touched test-touched-preflight pr-ready test-laws fmt-check test-packed-manual manual-gates test-remote test-e2e test-e2e-tui vet check size clean \
.PHONY: all build build-check build-cross debug demo-home clean-run embed manual-pack-law furrow test test-focus test-report test-quick test-tooling test-touched test-touched-preflight pr-ready test-laws test-carried-help fmt-check test-packed-manual manual-gates test-remote test-e2e test-e2e-tui vet check size clean \
changelog changelog-new changelog-check changelog-preview

# What the shipped binary is allowed to weigh, in bytes, checked in beside the
Expand Down Expand Up @@ -189,7 +189,7 @@ test-report:
build-check:
go build ./...

test-quick: build-check vet fmt-check test-packed-manual changelog-check manual-gates test-laws
test-quick: build-check vet fmt-check test-packed-manual changelog-check manual-gates test-laws test-carried-help

# The shell runners are executable infrastructure that Go's package walk cannot
# discover, so their acceptance scripts are named here. The benchmark clone
Expand Down Expand Up @@ -269,6 +269,11 @@ pr-ready: test-touched-preflight
test-laws:
./scripts/laws.sh

# Carried help spans the registered programs, so testing only a changed program
# package misses a description that no longer fits the shared eighty-cell page.
test-carried-help:
go test ./internal/delegate/builtin -run '^TestEveryCarriedProgramsHelpFitsEightyColumns$$' -count=1

# gofmt is not a preference here. A file gofmt would rewrite is a file the next
# editor's save rewrites, and that diff lands in somebody else's pull request.
fmt-check:
Expand Down
9 changes: 9 additions & 0 deletions docs/changes/unreleased/1810-senior-dev-help-width.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
kind: fixed
title: senior-dev help fits eighty columns and is checked before merging
pr: 1810
surface: [engine, build, docs]
invalidates:
- "The senior-dev run help printed --state-dir, --verify-build and --verify-test beyond eighty columns. Their descriptions now fit, and the state-dir line points to the manual's record-folder and environment defaults."
- "A change to a carried program's flags could pass the PR gate without running the registry's help-width test. The light gate and make test-quick now run that test for every carried program and command."
---
7 changes: 6 additions & 1 deletion docs/rules/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ one required name, is green only when both halves are.

## What the light gate actually checks

Seven things in `ci.yml`, job name `light gate`, then the touched packages, then `check`:
Eight things in `ci.yml`, job name `light gate`, then the touched packages, then `check`:

- **`go build ./...`** — several sessions work this tree at once and a
half-finished file breaks the build for everybody. Cheapest possible answer to
Expand Down Expand Up @@ -66,6 +66,11 @@ Seven things in `ci.yml`, job name `light gate`, then the touched packages, then
after the link. Every test in a file that carries the marker runs, so a file
whose behavioural half is slow should move its laws out rather than argue with
the script.
- **Carried program help fits eighty columns.** `make test-carried-help` runs
the existing width test against every registered program and command, with
the shared flags included. It runs on every light gate and in `test-quick`,
because the touched-package selector does not follow reverse dependencies
from a program's flags to the registry's help test.

**`touched packages`** is the aggregate job: the full suite of every package
this change touched runs with `-count=1` in concurrent tui3, session, codeaf and
Expand Down
6 changes: 3 additions & 3 deletions internal/seniordev/seniordev.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ func bindRun(fs *flag.FlagSet) delegate.Body {
asked := fs.Bool("asked", false, "the --high models were asked for by name; none is skipped")
// The project's own check, named by whoever started the run, for a project
// whose build or test discovery cannot find (fullverification/declared.go).
verifyBuild := fs.String("verify-build", "", "the project's build command, run on the frozen tree in place of the one discovered")
verifyTest := fs.String("verify-test", "", "the project's test command, run on the frozen tree in place of the one discovered")
verifyBuild := fs.String("verify-build", "", "build command on the frozen tree; replaces discovery")
verifyTest := fs.String("verify-test", "", "test command on the frozen tree; replaces discovery")
// Where the session store lives when the folder's own .senior-dev is not
// safe to keep it in: a rig that resets the folder, or one that collects the
// store after the run (app/state_dir.go).
stateDir := fs.String("state-dir", "", "keep the session database and conversation here, outside the folder (default: $"+app.StateDirEnv+", else .senior-dev)")
stateDir := fs.String("state-dir", "", "session store path (see manual for defaults)")
return func(ctx context.Context, host delegate.Host, args []string) error {
run(ctx, host, app.Options{
Goal: strings.Join(args, " "),
Expand Down
Loading