Skip to content

Repo quality: 30-second start, CI, community files, AGENTS.md - #12

Merged
ZacxDev merged 7 commits into
mainfrom
feat/repo-quality
Nov 3, 2026
Merged

ZacxDev merged 7 commits into
mainfrom
feat/repo-quality

Conversation

@ZacxDev

@ZacxDev ZacxDev commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Repo-quality pass ahead of promoting ClankMail alongside Clanksquare. No protocol, vector or library code changes.

What changes

  • README first screen answers "how do I try it in 30 seconds": the Clanksquare paste-to-agent prompt, then one minimal Go / Python / TypeScript example (sign a handle, run the §4 pipeline, submit to a local hub). Adds a CI badge, a pointer to the community files, and an About line: built by @ZacxDev, most code written by AI coding agents (Claude Code) under his direction, hosted hub run by him.
  • CI (.github/workflows/ci.yml, push + pull_request to main), using existing Makefile targets, the typecheck from ts/NOTES.md, and one new target:
    • Go (version from go.mod, 1.22): make conformance-go, make vectors + git diff --exit-code -- vectors/, make hub-consumer-check
    • Hub: make hub-test (-race) on Go 1.26.x, a workaround for a pre-existing failure tracked in hub: TestDigestMemoryBounded fails under -race on Go < 1.26 (64.7 MiB vs 64 MiB bound) #13
    • Python: make conformance-python
    • TypeScript: make conformance-ts, tsc -p ts --noEmit (typescript@7.0.2)
    • make hub-mutate (200 mutants, about 5 min)
    • make smoke-local, then make readme-snippets (new: scripts/readme-snippets.sh)
  • Community files: CONTRIBUTING.md (the single source for test commands, the spec ⇒ vectors ⇒ every implementation rule, and the public-repo rule), SECURITY.md, AGENTS.md (links to CONTRIBUTING, keeps only agent-specific points), .github/ISSUE_TEMPLATE/{bug,spec-change}.md, .github/pull_request_template.md.

Round 0 deletion candidates, applied

  • D1: the README snippets are guarded. make readme-snippets pulls the Go, Python and TS blocks out of the README's "Try it in 30 seconds" section (exactly one per language, or it fails), starts a throwaway hub on 127.0.0.1:8080 and runs each one. Each must exit 0, print an m_ id, and leave its handle resolvable. The Go snippet builds against this checkout through a replace, so CI tests the commit and not @latest. The README text is unchanged except for trimmed prose.
    Red/green, each case in a scratch copy:

    Mutation Result
    none (control) exit 0: ok go, ok python, ok ts
    Go snippet: invalid handle name exit 1, FAIL go: exited non-zero
    Python snippet: clankmail.sing exit 1, FAIL python: exited non-zero
    TS snippet: /v1/submitx exit 1, FAIL ts: no m_ id in output
    working tree: KeyID renamed in go/clankmail exit 1, FAIL go, undefined: clankmail.KeyID (proves the replace)
    ```ts relabelled exit 1, want exactly one ```ts block in the section
  • D2: no duplicated rules. The commands and the spec rule now live only in CONTRIBUTING.md. That copy also fixes the drift: the hub-test Go 1.26 note and typescript@7.0.2 pinned as in CI.

  • D3: the hub-test pin is tracked. hub: TestDigestMemoryBounded fails under -race on Go < 1.26 (64.7 MiB vs 64 MiB bound) #13 describes the failure and the two fix options, and the ci.yml comment references it.

Pre-existing failure behind the Go 1.26 hub-test pin (#13)

Under -race, TestDigestMemoryBounded allocates 64.7–64.8 MiB on Go 1.22–1.25 against its 64 MiB bound, and 59.8 MiB on 1.26. Without -race it allocates 52.7 MiB on 1.22–1.24 and 37.6 MiB on 1.26. That makes make hub-test red on the go 1.22 floor and on the Dockerfile's 1.24. The test itself is unchanged. hub-mutate still exercises it without -race and kills its mutant.

Verification

  • CI run https://github.com/ZacxDev/clankmail/actions/runs/41560315979 at 4011c94 is green, and its logs show the counts: ts 165 passed; python 165/165; Go reference ok; hub ok on Go 1.26.10; mutation 200/200 killed, 75 controls; smoke 10 ok steps; readme-snippets ok go, ok python, ok ts.

  • Local results at 4011c94 (Go 1.26.8, Node 24.21, Python 3.12):

    Suite Result
    Go reference 166 tests pass
    Python 165/165 vectors
    TypeScript 165 passed
    Hub (-race) 82 tests pass, 0 fail, 0 skip
    make vectors byte-identical
    hub-consumer-check ok
    smoke-local 10/10 steps
    readme-snippets 3/3
    tsc clean
    hub-mutate 200/200 killed, 75 controls, 0 problems
  • Checked that two of the CI steps can fail: a type error in ts/ makes the tsc step exit 1, and a changed vectors.json makes the vectors diff step exit 1.

  • Private vulnerability reporting is enabled (GET /repos/ZacxDev/clankmail/private-vulnerability-reporting → {"enabled":true}), so the SECURITY.md link works. Nothing in the snippets or tests touched the hosted hub.

🤖 Generated with Claude Code

ZacxDev and others added 4 commits November 2, 2026 19:08
Jobs: Go (conformance-go, vectors reproducible via make vectors + git diff,
hub-test with -race, hub-consumer-check), Python conformance, TypeScript
conformance + tsc typecheck (ts/NOTES.md), the hub guard mutation battery
(make hub-mutate, ~4 min locally), and smoke-local. Go version from go.mod.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
First screen now answers "how do I try it": the Clanksquare paste-to-agent
prompt, then one minimal Go / Python / TypeScript example that signs a
handle, runs the §4 pipeline and submits it to a local hub. Each snippet was
extracted from this README and run against the README's own hub command
(200 + stored handle for all three; the Go one via go get @latest).

Adds a CI badge, a Contributing and security pointer, and an About line
disclosing that most of the code was written by AI coding agents (Claude
Code) under @ZacxDev's direction and that he runs the hosted hub.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CONTRIBUTING: build/test per language from the Makefile; a spec change ships
SPEC.md + regenerated vectors + every implementation together; agents may
contribute. SECURITY: private reporting via GitHub security advisories; this
repo owns protocol, signature, verification and reference-hub flaws.
AGENTS.md: layout, the spec => vectors => every implementation rule, test
commands, and the public-repo rule. Templates: bug, spec-change proposal, PR.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The first CI run failed hub-test on go.mod's Go 1.22: TestDigestMemoryBounded
"one digest allocated 64.7 MiB, bound 64 MiB". Reproduced locally; under
-race the digest allocates 64.7 MiB on Go 1.22, 1.23 and 1.25 and 64.8 MiB on
1.24, but 59.8 MiB on 1.26 (without -race: 52.7 MiB on 1.22-1.24, 37.6 MiB on
1.26). The test is unchanged; hub-test moves to its own job on 1.26.x, the
other Go steps stay on the go.mod version.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ZacxDev

ZacxDev commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Audit round 0 (requirements & deletion) at e87d172: proceed to the checklist. No open premises. Requirements: 10 (unattributed: 1, the Go-1.26 hub-test pin).

D1 — README 30-second-start snippets (Go @latest, Python, TS) are unguarded against drift: run them in the smoke job or cut Python/TS, keeping agent prompt + Go
D2 — AGENTS.md duplicates CONTRIBUTING.md's command table and spec→vectors→impls rule, already diverged: single-source the commands in CONTRIBUTING, link from AGENTS.md
D3 — hub-test Go 1.26.x pin works around a pre-existing -race memory-bound failure on the go 1.22 floor and Dockerfile 1.24 with no tracked follow-up: fix the bound or raise go/hub's go line and drop the pin; at minimum file the issue

ZacxDev and others added 3 commits November 2, 2026 19:31
scripts/readme-snippets.sh (make readme-snippets) extracts the Go, Python
and TypeScript blocks from README.md's "Try it in 30 seconds" section, starts
a throwaway hub on 127.0.0.1:8080 and runs each one: it must exit 0, print an
m_ id, and leave its handle resolvable. Exactly one block per language must
be found. The Go snippet builds against this checkout through a replace, so
CI tests the commit, not @latest.

Mutation controls, each in a scratch copy: an invalid handle in the Go
snippet, a misspelt function in the Python one, a wrong path in the TS one,
KeyID renamed in the working tree's go/clankmail ("undefined:
clankmail.KeyID", which proves the replace), and the ts block relabelled all
exit 1 with the matching FAIL line; the unmutated copy exits 0.

Also trims the section's prose and references #13 from the hub-test Go pin.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
AGENTS.md had copies of CONTRIBUTING's command table and the
spec => vectors => every implementation rule, and they had already drifted
(no Go 1.26 note for hub-test, an unpinned typescript). CONTRIBUTING now
holds both, with the hub-test Go 1.26 note (#13), typescript@7.0.2 pinned as
in CI, the readme-snippets row and the full public-repo rule. AGENTS.md links
to it and keeps only the agent-specific points.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Round 1 Y1: with another hub already answering on 127.0.0.1:8080 (the
README's own start command), this script's hub failed to bind but the
readiness probe got a 200 from the foreign one, so the snippets were
tested against a hub not built from the checkout and could pass. It now
refuses up front when :8080 already answers, and checks after startup
that its own hub is still running. G1: curl gets --max-time and each
snippet a 120 s timeout, so a port that accepts but never answers fails
instead of hanging.

Checked: clean run ok go/python/ts; with a stand-in server answering 200
on :8080 the script exits non-zero with "127.0.0.1:8080 is already in
use"; port free afterwards.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ZacxDev

ZacxDev commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Audit round 1 (nine axes) at 4011c94: 0 🔴, 1 🟡, 2 🟢 — ladder ends; fixes in one final commit, not re-audited.

1. Y1: readme-snippets refuses when 127.0.0.1:8080 already answers, and checks its own hub is running after startup
2. G1: curl --max-time and a 120 s timeout per snippet
3. G2 (actions pinned by major tag; unpinned pip cryptography): recorded, no change

@ZacxDev
ZacxDev marked this pull request as ready for review November 3, 2026 01:48
@ZacxDev
ZacxDev merged commit 378267f into main Nov 3, 2026
6 checks passed
@ZacxDev
ZacxDev deleted the feat/repo-quality branch November 3, 2026 01:48
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.

1 participant