diff --git a/.claude/skills/tina4-maintainer/SKILL.md b/.claude/skills/tina4-maintainer/SKILL.md index aa95be44..ace82811 100644 --- a/.claude/skills/tina4-maintainer/SKILL.md +++ b/.claude/skills/tina4-maintainer/SKILL.md @@ -106,7 +106,7 @@ is shown with a one-line example of it firing. *Example:* `Not "the adapter can't connect" - I ran it, it connects; the failure was a missing env var in my shell, not the code.` - **📦 Question the import.** The moment you reach for a library - or notice one already imported - ask what it actually buys you and whether a small function you own would do the job. Every dependency is a liability you carry forever: supply-chain risk, version churn, install weight, a black box in your stack, one more thing to audit. Tina4's core is zero-dependency on purpose; hold app code to the same bar. The exception is genuine, risky complexity you must never hand-roll - crypto, a wire protocol, a real database driver - where a vetted library IS the lean choice. When in doubt, write the little function and own its correctness. *Example:* `📦 A whole date library for one "days between" call? Replaced it with a 4-line function - one less dependency to install, pin, and audit forever.` -- **🔎 Sweep the whole family's issues.** Tina4 is one framework in four languages, so triage is cross-repo, not per-repo. At the start of a maintenance pass and before any release, list the OPEN issues across ALL the tina4stack repos - tina4-python, tina4-php, tina4-ruby, tina4-nodejs, tina4-js, plus tina4 (the CLI), tina4-documentation, and tina4-book - not just the one in front of you. A bug reported against one language almost always exists in the other three: reproduce it against all four before deciding it is framework-specific, and fix it once at full parity instead of filing N separate tickets. Use `gh issue list -R tina4stack/ --state open` per repo, or `gh search issues org:tina4stack state:open --limit 100`, and group what you find by SUBSYSTEM (Frond / ORM / queue / router), not by repo. This is the discovery habit; its partner discipline is to verify every reported bug against all four frameworks before closing it - a green in one language is not a fix. +- **🔎 Sweep the whole family's issues.** Tina4 is one framework in four languages, so triage is cross-repo, not per-repo. At the start of a maintenance pass and before any release, list the OPEN issues across ALL the tina4stack repos - tina4-python, tina4-php, tina4-ruby, tina4-nodejs, tina4-js, plus tina4 (the CLI), tina4-documentation, and tina4-book - not just the one in front of you. A bug reported against one language almost always exists in the other three: reproduce it against all four before deciding it is framework-specific, and fix it once at full parity instead of filing N separate tickets. Use `gh issue list -R tina4stack/ --state open` per repo, or `gh search issues org:tina4stack state:open --limit 100`, and group what you find by SUBSYSTEM (Frond / ORM / queue / router), not by repo. This is the discovery habit; its partner discipline is to verify every reported bug against all four frameworks before closing it - a green in one language is not a fix. **Sweep CodeQL, not just GitHub Issues** - most security defects surface as code-scanning alerts, never as a ticket: `gh api repos/tina4stack//code-scanning/alerts --paginate -f state=open` per repo, grouped by rule + subsystem. CodeQL flags a code/regex SHAPE against a generic model, so CONFIRM exploitability before you rank it - a `polynomial-redos` shape is a catastrophic DoS on Node's V8 and Python's `re` (both backtrack) yet stays linear on Ruby's Onigmo, so the identical alert is a real hole in one framework and defense-in-depth in another. Fix the exploitable ones first, harden the rest for parity, and DISMISS a genuinely-safe one with a written reason rather than muting the scanner. Keep CodeQL on every shipped repo (it also catches injection, traversal, XXE, hardcoded secrets); scope out NON-shipped paths (benchmarks, examples, minified bundles) with `paths-ignore`, never by disabling a whole repo. *Example:* `🔎 Org issue sweep: php#170 and a ruby report are the same number_format gap - one Frond fix across all four, not two tickets; nodejs#33 has no twin elsewhere (genuinely Node-only).` - **🔧 Fix on discovery - a bug you hit IS the work, not a ticket.** A defect you run into during ANY pass - an audit, a review, a mutation check, a test run, someone else's PR, or just a tangential file you opened - gets FIXED in the same session, at full parity across all four, before you call the pass done. Never park it as "out of scope", "separate task", "follow-up", or "next pass": a flagged bug reads as handled and rots in the gap between mentioned and done. FIRST confirm it is really a defect - against the contract fixtures and the Python master - because a "bug" that contradicts the master is often correct behaviour you would REGRESS by "fixing" it; a stale TEST asserting the old contract is the bug, not the code. The ONLY legitimate defers are (1) a genuine open question that needs the maintainer's decision, surfaced explicitly; or (2) a live worker-collision on the same git tree - never edit a file a running worker is mid-edit in, sequence the fix right after it and do not drop it. Discovering it is the reason to fix it now. *Example:* `🔧 The queue-clear pass found Python's Kafka clear() silently returning 0 where PHP/Ruby raise - a real bug (it claims the queue emptied), fixed in the same pass at parity. Counter-case: deadLetters() "connecting first" LOOKED like a violation, but the master + contract say it ANSWERS - the stale TEST was the bug, not the code. Verify before you "fix".` diff --git a/.claude/skills/tina4-maintainer/references/checklists/pr-review.md b/.claude/skills/tina4-maintainer/references/checklists/pr-review.md index 107b5f34..5179f698 100644 --- a/.claude/skills/tina4-maintainer/references/checklists/pr-review.md +++ b/.claude/skills/tina4-maintainer/references/checklists/pr-review.md @@ -26,6 +26,12 @@ AND you have independently verified the work — an agent's own green run has ma PII, or exploit payload in the diff, tests, or PR text. - [ ] **CI required checks are green** — and authored by a real identity, not a bot token that never triggers the required checks (see the CLI packaging-PR lesson). +- [ ] **CodeQL / code-scanning is clean on the branch.** Check the PR's security results + for alerts the branch INTRODUCES (`gh pr checks`, or `gh api repos///code-scanning/alerts?ref=refs/pull//head`). + A new high/critical (injection, ReDoS, path traversal, hardcoded secret) blocks merge; + confirm a `polynomial-redos` alert's real severity against the target engine (V8/`re` + backtrack, Onigmo does not). A pre-existing alert the PR doesn't touch is noted, not + inherited - just never let the PR ADD one. ## Merging