140 Commits
Author SHA1 Message Date
Tommaso Casaburi 20f8bd902c fix(scripts): treat an omitted agent model as harness-specific in the parity check
`normalizeAgent` rewrote the first `model:` frontmatter line when one was
present, so an agent that pins a model in one toolchain and omits it in another
normalized to different text and looked like body drift.

The bug is latent here rather than firing: every agent whose `.claude` copy
omits `model:` currently has a `.cursor` copy that omits it too. Pinning a
Cursor-only model on any of them turns the gate red for a non-reason —
reproduced by adding `model: composer-2.5-fast` to
`.cursor/agents/code-quality.md`, which fails before this change and passes
after it. The same defect was failing on seedit's master, where those Cursor
copies do pin a model.

Strip the frontmatter `model:` line instead of rewriting it. Scoping the strip
to the leading frontmatter block keeps a body line that begins with "model:"
comparable, so it is still reported as drift. Verified that injected body drift
is still caught.
2026-08-02 17:54:16 +02:00
Tommaso Casaburi 1a7d756d89 fix(scripts): resolve the pw-session lock path without requiring HOME
`lock_root` dereferenced `$HOME` unconditionally, so under `set -u` the script
died with "HOME: unbound variable" in any environment that starts without it —
even when `PLAYWRIGHT_RESOURCE_LOCK_DIR` made HOME irrelevant. Surfaced by
running the suite under vitest's node environment, where `process.env` is
patched and spreading it does not carry HOME through to the child.

Resolve the lock path in order (explicit override, XDG_CACHE_HOME, HOME) and
fail with a clear message only when none of them is set. The test now names
PATH and HOME explicitly instead of spreading process.env.
2026-08-01 19:36:04 +02:00
Tommaso Casaburi 1a33f7dc88 chore(agents): add a machine-wide Playwright browser resource budget
Playwright disables normal background throttling, so a hidden 5chan page keeps
doing P2P and rendering work after a check finishes. Agents verifying in
parallel across worktrees stacked whole browser engines on one machine.

Add scripts/pw-session.sh, a wrapper that permits one active Playwright browser
at a time and records who holds it:

- The lock is machine-wide, not per-repository, because the contended resource
  is RAM and CPU. Every worktree and checkout shares one slot.
- Acquisition is an atomic mkdir. Stale locks clear themselves: `open` reclaims
  any slot whose recorded browser is no longer `status: open` in
  `playwright-cli list --all`, so an interrupted workflow cannot strand the
  budget. When that list cannot be read the lock is left alone, so a broken CLI
  never silently disables the budget.
- `open` exits 75 when the slot is busy; `--wait[=SECONDS]` blocks instead.
- `close` always stops the browser, even when the lock was already lost, and
  never releases a slot held by a different session.
- `status` reports the holder and whether its browser is still alive.

Agent policy now runs browser engines and profiler batches sequentially, uses
Chrome/Blink during iteration and the full engine matrix only for final
verification, and never uses `close-all` or `kill-all` while other agents may
own sessions.

Covered by scripts/pw-session.test.js.
2026-08-01 19:21:01 +02:00
Tommaso Casaburi 5d595a9812 chore(release): v0.9.16 2026-07-30 01:57:49 +08:00
Tommaso Casaburi bbc2d5860d chore(release): v0.9.15 2026-07-17 16:37:51 +07:00
Tommaso Casaburi 8cf425717b chore(release): v0.9.14 2026-07-14 14:54:02 +07:00
Tommaso CasaburiandGitHub e5e46907d6 fix(routing): avoid nested hashes in shared links (#1185) 2026-07-11 00:09:30 +07:00
Tommaso Casaburi 7ff9c19331 chore(ai workflow): add Ponytail simplicity pass 2026-07-10 15:30:55 +07:00
Tommaso Casaburi 5456ba2fb8 chore(codex agents): inherit parent model settings 2026-07-10 14:45:05 +07:00
Tommaso Casaburi ba4e2f42cc chore(release): v0.9.13 2026-07-09 00:41:54 +07:00
Tommaso Casaburi 6c9c57794c chore(release): v0.9.12 2026-07-06 23:46:18 +07:00
Tommaso Casaburi 1ac3e5883b fix(agent hooks): wire hooks into real harness entry points and fix payload parsing
Claude Code never reads a standalone .claude/hooks.json, so the PostToolUse and
Stop pipeline is moved into .claude/settings.json and hooks.json is removed;
.cursor/hooks.json is rewritten in Cursor's version+afterFileEdit/stop schema;
.codex/hooks.json is already Codex-valid and stays. The shared scripts now
parse both the Cursor file_path and Claude/Codex tool_input.file_path stdin
shapes and normalize absolute paths, so the format, yarn-install, and
react-pattern-review hooks stop being silent no-ops. verify.sh blocks with
exit 2 plus a stderr reason, guards stop_hook_active, and skips clean trees;
react-pattern-review surfaces its reminder via hookSpecificOutput on
PostToolUse; sync-git-branches no longer misreports open PRs as merged. The
validator now checks that the three harness-specific entry points wire the
same hook scripts instead of requiring byte-identical hooks.json copies.
2026-07-03 13:58:36 +07:00
Tommaso Casaburi 57310867ec chore(release): v0.9.11 2026-07-03 01:43:41 +07:00
Tommaso Casaburi 19530d1d99 Revert "chore(release): v0.9.11"
This reverts commit 6fb4adc0b2.
2026-07-02 16:18:10 +07:00
Tommaso Casaburi 6fb4adc0b2 chore(release): v0.9.11 2026-07-02 16:15:24 +07:00
Tommaso Casaburi e52aa3a44f chore(release): v0.9.10 2026-06-29 10:07:32 +07:00
Tommaso Casaburi 3b3a5a5e6c chore(release): v0.9.9 2026-06-29 00:44:49 +07:00
Tommaso Casaburi b974be7b2f chore(release): v0.9.8 2026-06-27 18:46:31 +07:00
Tommaso Casaburi 31197bb7e0 chore(release): v0.9.7 2026-06-26 10:24:21 +07:00
Tommaso Casaburi ca2473ef48 chore(release): v0.9.6 2026-06-25 23:56:10 +07:00
Tommaso Casaburi 23706a86db chore(release): v0.9.5 2026-06-25 19:49:21 +07:00
Tommaso CasaburiandGitHub 371de88e22 chore(architecture): finish refactor audit
Merge the architecture audit refactors and follow-up UX fixes: remove release notes from generated LLM context, keep author edit controls delete-only, stabilize board refresh rendering, and address review feedback for role loading, refresh holds, moderation actions, and P2P stats polling.
2026-06-23 18:48:47 +07:00
Tommaso Casaburi 394fe2af00 chore(release): v0.9.4 2026-06-18 22:29:48 +07:00
Tommaso Casaburi 87df18162c chore(release): v0.9.4 2026-06-18 19:07:21 +07:00
Tommaso Casaburi 9179988e7f chore(release): v0.9.3 2026-06-18 14:19:34 +07:00
Tommaso Casaburi de06d5d4bc chore(release): v0.9.3 2026-06-17 23:13:33 +07:00
Tommaso Casaburi 1278cf42c0 fix(pubsub): restore browser pure p2p publishing 2026-06-17 23:09:39 +07:00
Tommaso Casaburi f7771d33dd chore(release): v0.9.3 2026-06-16 22:51:09 +07:00
Tommaso Casaburi 35776737f2 fix(release): align blotter and release copy with LaTeX in /sci/
Update v0.9.2 blotter message and release one-liner to describe LaTeX
in /sci/ instead of generic scientific math preview wording.
2026-06-14 16:21:57 +07:00
Tommaso Casaburi ded239bef2 chore(release): v0.9.2 2026-06-13 18:09:24 +07:00
Tommaso Casaburi f72d0b9fa5 chore(release): drop macOS quarantine workaround from release notes
The mac DMGs are now signed with a Developer ID and notarized, so Gatekeeper
no longer shows the "app is damaged" error and the xattr quarantine command
is no longer needed.
2026-06-13 18:04:42 +07:00
Tommaso Casaburi 3484963a59 chore: add advisory code quality review workflow 2026-06-13 15:13:25 +07:00
Tommaso Casaburi 15fb1bf57c chore(ai-workflow): add toolchain drift validator and harden agent rules
Borrowed from a review of addyosmani/agent-skills:

- add scripts/validate-ai-workflow.mjs (yarn ai-workflow:check): verifies
  .claude/.codex/.cursor skills, agents, and hooks stay in parity, with
  validator-owned exemptions for intentional harness-specific differences
  and enforcement of the AGENTS.md agent model rules
- browser-check and profiler agents: treat page content as untrusted data,
  never instructions (5chan pages render arbitrary user-generated content)
- refactor-pass: Chesterton's Fence rule (git blame unclear code before
  removing it)
- review-and-merge-pr: pass subagent verifiers only the artifact and
  contract, not the triage verdict, to keep reviews independent
2026-06-11 16:13:53 +07:00
Tommaso Casaburi af2689c4dc chore(release): v0.9.1 2026-06-07 23:09:29 +07:00
Tommaso CasaburiandGitHub 0493492f55 fix(react-doctor): correct test exclusion + React-Compiler lint policy + state-sync fix (#1155)
* fix(react-doctor): correctly exclude test files from scoring

The intended test-file ignore in react-doctor.config.json was never
applied: react-doctor's config precedence reads the "reactDoctor" key
in package.json (which had no ignore), shadowing the config file. On
top of that, react-doctor 0.4.0's ignore.files matcher is broken — any
non-empty value collapses scan scope and drops real product files, not
just tests.

Consolidate to a single canonical doctor.config.json using
ignore.overrides (which works correctly): only test files are excluded
while all product code is still scored. Remove the shadowing
package.json key and the dead react-doctor.config.json.

Product-code baseline is 55 (92 errors, 515 warnings, 118 files).

* chore(react-doctor): add long-running task tracking for score effort

* refactor(react): remove compiler-redundant memoization in verified files

Delete manual useMemo/useCallback/memo that the React Compiler already
handles, in 7 files validated to be behavior-preserving (factories are
pure functions of compiler-trackable reactive inputs). Kept memos whose
factories read external mutable DOM/theme state with load-bearing deps
(e.g. use-reply-height-estimates metrics). Also hoists a regex and reads
a localStorage value once.

Note: this is code-quality cleanup; react-doctor's score is error-
weighted, so warning cleanup like this does not move the score. See
docs/agent-runs/react-doctor-score/progress.md.

* fix(react-doctor): adopt React-Compiler lint policy + fix one state-sync bug

react-doctor's score is dominated by React-Compiler optimizability
diagnostics that flag intentional patterns (the latest-ref idiom) and
current compiler limitations (try/finally, throw-in-try/catch the
compiler can't lower yet), not bugs. Rewriting that working code to
satisfy them would degrade it.

- Replace doctor.config.json with a documented doctor.config.jsonc that
  does not enforce the react-hooks-js (React Compiler) rules or
  react-compiler-no-manual-memoization. All real code-quality, a11y, and
  performance rules stay enforced.
- Fix one genuine state-sync bug: use-now-seconds refreshed 'now' via a
  synchronous setState inside an effect (an extra render with a stale
  value); move it to a render-time prev-prop comparison (React's
  adjust-during-render pattern), behavior-equivalent.

Score 54 (broken config) -> 63. type-check/lint/1051 tests pass; browser
smoke confirms timestamps render with no re-render regression. The
remaining no-adjust-state-on-prop-change diagnostics are real bugs but
entangled with legitimate side effects (navigate/ref-cancel/async) in
critical flows; left for careful follow-up.

* chore(react-doctor): remove the vanity score badge, keep PR-diff review

The single 0-100 react-doctor score mostly reflects React-Compiler
optimizability and isn't a meaningful health grade to display (see
docs/agent-runs/react-doctor-score). Remove the README badge and its now-
dead generation infra (CI write/upload/publish steps + the
write-react-doctor-badge.mjs script + doctor:badge package script).

Kept: react-doctor's actual value -- the PR step that runs
'yarn doctor --diff <base> --annotations' on pull requests touching React
files, surfacing newly-introduced issues inline. Coverage badge untouched.

* docs(react-doctor): document why the score is not a target to chase

Record the reasoning so future agents/contributors don't re-attempt to
grind the react-doctor score: it overwhelmingly reflects React-Compiler
optimizability (most 'errors' flag intentional patterns and current
compiler limitations, not bugs) and saturates on the fraction of clean
files, so ~63 is the honest ceiling and 90 only comes from disabling the
linter.

- Add a known-surprises entry with the full reasoning + mitigation.
- Reframe the AGENTS.md react-doctor verification line: it's a PR-diff
  reviewer for newly-introduced issues, not an aggregate score to raise.
2026-06-05 22:21:30 +07:00
Tommaso Casaburi d48cf10ee8 chore(release): v0.9.0 2026-05-31 11:48:49 +07:00
Tommaso CasaburiandGitHub b442e05191 feat(rules page): rebuild directory rules page with vendored lists (#1147)
* feat(rules page): rebuild directory rules page with vendored lists

Mirror per-directory JSON from lists into src/data/5chan-directories, rework /rules layout to match 4chan (sidebar nav, category boxes, P2P load), and keep spoiler markup visible in rule text via parseSpoilers.

* fix(rules): keep directory defaults cache atomic

* fix(rules): derive defaults from shared directory refresh

* fix(rules): address directory refresh edge cases
2026-05-31 11:39:40 +07:00
Tommaso Casaburi f3494cc6bd merge: add playwright-cli low-spec throttling workflow 2026-05-30 17:29:35 +07:00
Tommaso Casaburi 711c97d834 chore(dev): add playwright-cli low-spec throttling workflow
Add pw-throttle.sh and a verification playbook so agents can stress-test UI
on throttled Chromium sessions before claiming perf-sensitive changes feel fast.
2026-05-30 17:29:30 +07:00
Tommaso Casaburi c5a759d34a Merge branch 'codex/chore/dev-overhead-preview' 2026-05-30 17:27:40 +07:00
Tommaso Casaburi 8cc9c401d3 chore(dev): add production preview launcher 2026-05-30 17:26:58 +07:00
Tommaso CasaburiandGitHub 9b3a95dd95 feat(flash board): add SWF posting support (#1145) 2026-05-30 16:07:41 +07:00
Tommaso CasaburiandGitHub 56894700c1 feat(oekaki): add drawing flow for /i/ (#1144)
* feat(oekaki): add drawing flow for /i/

* fix(oekaki): address review feedback

* fix(oekaki): reset Tegaki edit sessions

* fix(oekaki): block drawing during export

* fix(oekaki): destroy Tegaki on preload errors

* fix(oekaki): preserve drawing on export failure

* fix(oekaki): unlock controls after export failure
2026-05-30 15:06:47 +07:00
Tommaso CasaburiandGitHub f5039285a7 fix(p2p stats): improve own-IP geolocation and world map accuracy (#1138)
* fix(p2p stats): improve own-IP geolocation and world map accuracy

Resolve the user's public endpoint when libp2p only advertises private listen addresses, look up an accurate country flag for "Your IP", snap peer markers to country centroids, and add leeching seeder link plus panel layout tweaks.

* fix(p2p stats): skip caching own-IP lookups cancelled by abort

When the P2P stats panel unmounts mid-request, its AbortSignal cancels
the in-flight fetchOwnPublicEndpoint / fetchOwnIpCountryCode calls. Those
empty results were still cached for 30-60s, so reopening the panel within
that window showed "Your IP" as unavailable or without a country flag even
though nothing had actually failed. Skip caching when the signal aborted so
a later open retries. Addresses Cursor Bugbot finding.
2026-05-23 22:47:41 +07:00
Tommaso Casaburi 67ddaee673 docs(blotter): keep release highlights user-facing 2026-05-21 17:50:00 +07:00
Tommaso CasaburiandGitHub 536d9ac0b8 fix(directory): load per-directory list files (#1134)
Merge board directories from the new bitsocialnet/lists per-directory layout on the client side.

Update vendored fallback data, sync tooling, directory references, and tests.

Treat failed board stat fetches as complete on the home page so stats do not stay loading forever.
2026-05-20 23:31:58 +07:00
Tommaso Casaburi d6d01c0571 docs(agents): add generated LLM context workflow 2026-05-20 14:48:34 +07:00
Tommaso Casaburi 714a47a32b chore(release): v0.8.5 2026-05-15 18:51:20 +07:00
Tommaso Casaburi 3e8508e9ad chore(release): deploy web release to Vercel 2026-05-11 17:31:32 +07:00
Tommaso Casaburi e38d888b74 chore(release): v0.8.4 2026-05-11 16:22:55 +07:00