Skip to content

Coding standards, M2 review deck, and CI hardening#2

Merged
guillaumejay merged 5 commits into
mainfrom
docs/standards-and-ci
Jun 14, 2026
Merged

Coding standards, M2 review deck, and CI hardening#2
guillaumejay merged 5 commits into
mainfrom
docs/standards-and-ci

Conversation

@bastien-gallay

Copy link
Copy Markdown
Collaborator

Imports and adapts standards + CI from lucid-lint, adds the M0→M2 code-review
deck, and trims the license allow-list. Four commits, scoped so each is
reviewable on its own.

Commits

  • docs: coding standards + M2 review deckCODING_STANDARDS.md (Tidy
    First · CUPID & YAGNI · TDD+Reflect · Clean Code), re-domained to termherd's
    hexagonal core and reconciled with this repo's actual toolchain/clippy/test
    policy. Plus the review as a Typst deck (docs/reviews/, CeTZ diagrams; PDF
    gitignored). AGENTS.md points to the standards and keeps precedence.
  • ci: harden workflows — SHA-pin every action, add concurrency +
    least-privilege permissions + workflow_dispatch, read the toolchain from
    rust-toolchain.toml (single-source 1.95.0), add actionlint, and a new
    CodeQL SAST workflow. Skipped lucid-lint bits that don't apply (dogfood,
    mdBook, coverage/scorecard needing secrets).
  • docs(review): pass-2 findings for ce13614 — extends the deck 6→8
    findings after rebasing onto the Attention-status feature. #7 is framed as
    contingent (the OSC 9 "done-ping" premise is unverified); #8 is a NOTE.
  • chore(deny): drop unused license entriesUnicode-DFS-2016 + MPL-2.0
    were allow-listed but used by no crate; removing them makes a future dep
    under either license a conscious decision. cargo deny check licenses now
    reports ok with 0 warnings.

Reviewer notes

  • CodeQL needs code-scanning enabled (Settings → Security). On a private
    repo without Advanced Security it will error — happy to path-gate or drop it.
  • The review deck's findings are advisory; no production code is changed here.

Import and adapt CODING_STANDARDS.md from lucid-lint: the four pillars
(Tidy First, CUPID & YAGNI, TDD + Reflect, Clean Code) re-domained to
termherd's hexagonal core (App::apply, Event/Effect, ports, SessionId).
Toolchain, clippy, layout and testing sections rewritten to match this
repo's actual policy (pinned 1.95.0, workspace lints, proptest/nextest).
AGENTS.md points to it and keeps precedence.

Add the medium-effort review of the M0..M2 build-out as a Typst deck
(docs/reviews/), with three CeTZ diagrams. The rendered PDF is a build
artifact and is gitignored.
Pin every third-party action to a commit SHA (version in a trailing
comment), add a concurrency group that cancels superseded runs, set
least-privilege `permissions: contents: read`, and add `workflow_dispatch`
plus `RUST_BACKTRACE`.

Let dtolnay/rust-toolchain read the version from rust-toolchain.toml so the
pinned 1.95.0 (Q10) stays single-source instead of being duplicated in CI.
Install cargo-deny via taiki-e/install-action and run `cargo deny check`.

Add an actionlint job (workflow lint, verified downloader) and a CodeQL
workflow (whole-program SAST, security-and-quality suite, no path gate so
it covers every commit on main).

Skipped as not applicable / needing setup: coverage (CODECOV_TOKEN),
scorecard, typos, lychee, mdBook docs, and lucid-lint's self-dogfood job.
After rebasing onto ce13614 (permission/attention status + sidebar
badges), extend the review deck from 6 to 8 findings:

- #7 Attention is sticky with no non-Busy escape, and fold_status
  discards the OSC 9 payload. Framed as contingent (MED?): the "false
  alarm" depends on Claude emitting non-permission OSC 9, which is not
  verified here — the verifiable part is the discarded payload + missing
  escape path.
- #8 the status state machine is split across pty (stickiness) and core
  (Exited-is-terminal); a NOTE that reinforces #6.

Adds a CeTZ state-machine diagram for #7 and updates the verdict table
and recommended-order slides.
`cargo deny check licenses` reported Unicode-DFS-2016 and MPL-2.0 as
not-encountered: allow-listed but used by no crate in the graph (all
targets). Remove them so the allow-list mirrors the actual tree — a new
dependency under either license now fails the check and forces a
conscious decision rather than passing silently. Unicode-3.0 (the
successor that is in use) stays. Re-adding is trivial if ever needed.
The pinned dtolnay/rust-toolchain commit requires an explicit `toolchain`
input — omitting it (to read rust-toolchain.toml) made every Rust job and
CodeQL fail instantly with "'toolchain' is a required input". Pass
`toolchain: "1.95.0"` in all four steps, kept in lockstep with
rust-toolchain.toml / Cargo.toml (Q10).

actionlint failed on the cargo-dist-generated release.yml (shellcheck
SC2086 info / SC2129 style, which we don't own). Set
`SHELLCHECK_OPTS=--severity=warning` on the actionlint job so it still
catches real warnings/errors in our own workflows but tolerates the
generated file.
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@guillaumejay guillaumejay merged commit 9a7bf3c into main Jun 14, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants