GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge origin/main into fork/review-rules-799-841 · scuttletoby/t3code@e2252e5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github
    • fork-pr-queue.json
    • fork-review-kit.json
    • fork-seams.json
    • scripts
      • fork-contracts.test.py
    • workflows
      • fork-secret-scan.yml
      • fork-secret-sweep.yml
  • docs/fork
    • agent-rules.md
  • fork-ci
    • RELEASE-NOTES.md
    • actions/pr-queue
      • review_judge.py
      • review_judge.test.py
  • fork-kit
    • heavy
      • README.md
      • bin
        • heavy
        • t3-capacity
      • lib
        • heavy_facts.py
        • heavy_sweep.py
      • tests
        • facts.test.py
        • heavy.test.py
        • sweep.test.py
    • review
      • COMMENTS.md
      • README.md
      • REVIEW.md
      • SKILL.md
      • eval
        • README.md
        • eval.example.json
      • lib
        • review_eval.py
        • review_kit.py
      • tests
        • comments.test.py
        • eval.test.py
        • plan.test.py
  • packages/client-runtime/src/state
    • threadRoles.test.ts
    • threadRoles.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/fork-pr-queue.json‎

Copy file name to clipboardExpand all lines: .github/fork-pr-queue.json
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
".github/fork-owned-paths.txt",
3434
".github/fork-pr-queue.json",
3535
".github/fork-removed-workflows.txt",
36+
".github/fork-review-kit.json",
3637
".github/fork-secret-sweep-gone-tips.txt",
3738
".github/fork-tests-upstream.json",
3839
".github/fork-upstream.json",
Collapse file

‎.github/fork-review-kit.json‎

Copy file name to clipboard
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"version": 1,
3+
"queue_config": ".github/fork-pr-queue.json"
4+
}
Collapse file

‎.github/fork-seams.json‎

Copy file name to clipboardExpand all lines: .github/fork-seams.json
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
"added": ["...ForkSettings.ForkClientSettingsPatchFields,"]
2626
}
2727
},
28+
"packages/client-runtime/package.json": {
29+
"why": "The calm sidebar's shared logic (fork file src/state/threadRoles.ts) is exported for the web and phone lists with one line; it is announced for the sidebar PR that first imports it. One line, since the four-line form's closing brace is a line upstream already has.",
30+
"added": [],
31+
"announced": {
32+
"since": "2026-11-22",
33+
"added": ["\"./state/thread-roles\": \"./src/state/threadRoles.ts\","]
34+
}
35+
},
2836
"packages/shared/src/serverSettings.ts": {
2937
"why": "A settings patch's fork fields are applied by forkSettingsPatch.ts, by the rules in forkSettings.ts.",
3038
"added": [
@@ -549,13 +557,15 @@
549557
"apps/web/src/clientPersistenceStorage.removedKeys.test.ts",
550558
"apps/web/src/components/settings/WaitsAndSlotsSettings*",
551559
"apps/web/src/components/settings/waitsAndSlotsSettings*",
560+
"packages/client-runtime/src/state/threadRoles*",
552561
"packages/contracts/src/editor.test.ts",
553562
"packages/contracts/src/handoff.test.ts",
554563
"packages/contracts/src/handoff.ts",
555564
"packages/contracts/src/mcpProfile*",
556565
"packages/contracts/src/modelPolicy*",
557566
"packages/contracts/src/playtest*",
558567
"packages/contracts/src/reviewRules*",
568+
"packages/contracts/src/threadRoles*",
559569
"packages/contracts/src/usagePacing.ts",
560570
"packages/contracts/src/waitFor*",
561571
"packages/shared/src/agentSlots*",
Collapse file

‎.github/scripts/fork-contracts.test.py‎

Copy file name to clipboardExpand all lines: .github/scripts/fork-contracts.test.py
+121-10Lines changed: 121 additions & 10 deletions
Large diffs are not rendered by default.
Collapse file

‎.github/workflows/fork-secret-scan.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/fork-secret-scan.yml
+18-8Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ name: Fork secret scan
1818
# request that check also reads every earlier head of the PR's branch (the scan step), since only
1919
# the newest head's check counts.
2020
# - workflow_call from fork-secret-sweep.yml (daily, and by hand): the sweep, every ref but pull
21-
# request heads, for what no push run read. Same script and settings; no concurrency group. That
22-
# workflow opens an issue when the sweep fails (a schedule run alerts no one otherwise).
21+
# request heads, for what no push run read. Same script and settings; no concurrency group here
22+
# (that workflow runs its sweeps on one ref one at a time, for the record). That workflow opens
23+
# an issue when the sweep fails (a schedule run alerts no one otherwise).
2324
# The scan script always comes from the default branch's tip, never from the checkout: a pull
2425
# request or a branch cannot change how it is scanned by editing the script, and an old branch
2526
# gets today's scan. The checkout's own copy runs only in the `tests` job, on a runner of its own:
@@ -72,9 +73,11 @@ jobs:
7273
# (on main: a merge after green CI; admins may bypass), and it can only spare tips GitHub's
7374
# API calls gone. A run on a tag named like the branch has that name as its head_branch too:
7475
# while such a tag exists no record is read (#703); a ruleset that blocks creating it closes
75-
# the case of one created and deleted again. A re-run of a sweep run first takes its own
76-
# earlier attempt's record (#703), a reset run's re-run too. The output `read` says how the
77-
# read ended, for the scan step's partial record.
76+
# the case of one created and deleted again. A re-run of a sweep run is meant to take its own
77+
# newest earlier attempt's record first (#703), a reset run's re-run too; not yet confirmed
78+
# live (#950): when it is not found, a reset run's re-run takes the empty record and any other
79+
# re-run the newest earlier sweep's. Never re-run a finished reset run; start a new reset run
80+
# by hand. The output `read` says how the read ended, for the scan step's partial record.
7881
- name: Read the sweep's record
7982
id: read
8083
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
@@ -89,9 +92,15 @@ jobs:
8992
mkdir -m 700 -- "$dir"
9093
# none STATE WHY: no record. STATE, the output `read`: "none" when no earlier sweep kept one,
9194
# "failed" when one may exist but cannot be read or trusted; then a partial record of this
92-
# run must not replace it (#703).
95+
# run must not replace it (#703). A reset run on a branch (its re-run reads its own record)
96+
# takes the empty record instead of "failed": it trusts nothing, so it is always safe, and a
97+
# failed call cannot leave the record from before the reset in use (#791).
9398
none() {
9499
rm -rf -- "$zip" "$dir/deleted-tips"
100+
if [[ "$1" == failed && "$RESET" == true && "$GITHUB_REF" == refs/heads/* ]]; then
101+
echo "::warning title=Secret scan::$2" >&2
102+
empty_record
103+
fi
95104
echo "read=$1" >> "${GITHUB_OUTPUT:?}"
96105
echo "::warning title=Secret scan::$2, so every listed tip is checked as on a first run" >&2
97106
exit 0
@@ -107,8 +116,9 @@ jobs:
107116
fi
108117
# reset_record: an empty record (the header only), which the last step keeps even when this
109118
# run fails before the scan step writes its own, so no later sweep reads the older one (#703).
110-
# A re-run of a reset run (it keeps the input) first takes its own earlier attempt's record,
111-
# which was written after the reset, and no older run's; without one, the empty record.
119+
# A re-run of a reset run (it keeps the input) first takes its own newest earlier attempt's
120+
# record, which was written after the reset, and no older run's; without one, or when it cannot
121+
# be read, the empty record.
112122
empty_record() {
113123
echo "fork secret sweep record 2" > "$dir/deleted-tips"
114124
echo "read=reset" >> "${GITHUB_OUTPUT:?}"
Collapse file

‎.github/workflows/fork-secret-sweep.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/fork-secret-sweep.yml
+20-3Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,20 @@ name: Fork secret sweep
1717
# start the record afresh (a tip marked read in error), run this workflow by hand with
1818
# reset_record: that run checks every listed tip as on a first run and keeps a new record; if it
1919
# fails before the scan writes one, it keeps an empty record (#703), so the old one is not used again.
20-
# A re-run of it goes on from its own first attempt's record. A sweep that starts while the reset
21-
# run is still running reads the old record, and as the newer run its record is the one the next
22-
# sweep reads, so the reset is undone: start the reset when no sweep is running, again if one did.
20+
# A re-run of it is meant to go on from its own newest earlier attempt's record, kept after the
21+
# reset, but that is not yet confirmed live (#950); when that record is not found or cannot be read,
22+
# it starts from the empty record again (#791).
23+
# Sweeps of one ref run one at a time (the concurrency group below, #791): a sweep that starts while
24+
# the reset run is running waits for it, then reads its record, so it cannot undo the reset. GitHub
25+
# keeps one run waiting per group, and a newer run cancels the waiting one (never the running one),
26+
# and the running run always ends, so no run waits for ever. A new sweep cancelled so loses only its
27+
# own run: the newer run (same workflow, same ref) sweeps and alerts the same. A re-run cancelled so
28+
# is not the same: the whole run then shows as cancelled, and the record its earlier attempt kept is
29+
# no longer read (the reader takes only success or failure), so after a reset run the next sweep may
30+
# read the record from before the reset. Never re-run a finished reset run; start a new reset run by
31+
# hand with reset_record. A reset run cancelled so (or by hand) shows as cancelled and is not read:
32+
# start the reset again as a new run by hand with reset_record, not a re-run (a re-run stays the
33+
# older run, and the next sweep reads the newer one's record, from before the reset).
2334
# Contract: fork-contracts.test.py (secret-scan).
2435
on:
2536
schedule:
@@ -34,6 +45,12 @@ on:
3445
permissions:
3546
contents: read
3647

48+
# One sweep of a ref at a time, never cancelled by a newer one (see the top): each reads the record
49+
# of the one before it on that branch. Not in fork-secret-scan.yml: a push's scan must not wait.
50+
concurrency:
51+
group: fork-secret-sweep-${{ github.ref }}
52+
cancel-in-progress: false
53+
3754
jobs:
3855
sweep:
3956
name: Secret sweep
Collapse file

‎docs/fork/agent-rules.md‎

Copy file name to clipboardExpand all lines: docs/fork/agent-rules.md
+2-1Lines changed: 2 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ Where a tool enforces a rule, the tool is the authority.
5555
- Never update pull request branches by hand when a merge queue does it. _Why: it restarts every CI at once._
5656
- Reports, handoffs and review notes go in the pull request or an issue. _Why: the repository holds current text._
5757
- Reviews follow the [review skill](../../fork-kit/review/SKILL.md) (weights, the state question, round limit);
58-
never restate it. _Why: one source._
58+
never restate it; its `plan` and `check` take `--settings .github/fork-review-kit.json` here. _Why: one source;
59+
without it the kit reads no queue config and plans one lens._
5960
- No `git stash`; edit tracked files in place. _Why: worktrees share the stash; a move drops `+x`._
6061
- In a fork: build on upstream's mechanisms, check upstream first, never push, comment or open anything upstream.
6162
_Why: thin forks rebase cleanly; upstream is the owner's._
Collapse file

‎fork-ci/RELEASE-NOTES.md‎

Copy file name to clipboardExpand all lines: fork-ci/RELEASE-NOTES.md
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ nothing.
1313

1414
## After ci/v14
1515

16+
### pr-queue: what counts as a `state:` line is gate code (#797)
17+
18+
`review_judge.has_state_line` holds the rule for a lens report's `state:` line (an answer after the colon, outside code
19+
blocks and quotes). The gate still parses `state_line` without enforcing it, so nothing a caller sees changes. The
20+
review kit (fork-kit/review) now imports this rule and the gate's `head_check.changed_paths` instead of its own
21+
copies, so run the kit from a checkout at the release the gate pins (kit README, "Which fork version").
22+
1623
### pr-queue and head-check: every rule hit gives its lenses (#82)
1724

1825
With a `review` block in `enforce`, the required lenses are now the lenses of every rule a changed path counted for,
Collapse file

‎fork-ci/actions/pr-queue/review_judge.py‎

Copy file name to clipboardExpand all lines: fork-ci/actions/pr-queue/review_judge.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
until a person's override for the head, newer than every lens comment, lets it through (it alone is enough: it
3535
also waives the approach lens). Owner decision: issue #100.
3636
Pure as judge is: the lens comments come in (lens.Review.lens_scan), the verdict goes out.
37+
38+
has_state_line says what counts as a report's `state:` line (the answer to the state question). The `state_line`
39+
setting is parsed but not enforced yet; the review kit (fork-kit/review, `check`) imports this rule, so the gate and
40+
the kit read one rule when the gate starts enforcing it.
3741
"""
3842
import html
3943
import re
@@ -367,6 +371,15 @@ def read_findings(body):
367371
return [found[i] for i in sorted(found)], seen >= set(BLOCKING)
368372

369373

374+
STATE_RE = re.compile(r'state\s*:\s*\S', re.I)
375+
376+
377+
def has_state_line(body):
378+
"""A `state:` line with an answer (anything but blanks after the colon), outside fenced and indented code blocks and
379+
quotes, read as a lens header is (folded, markdown and list markers stripped: `**State:** ok`, `- state: ok`)."""
380+
return any(STATE_RE.match(lens.norm_line(fold(raw))) for raw in lens.plain_lines(body))
381+
382+
370383
def findings(body):
371384
"""[(kind, line)] of the report's blocker and major findings (read_findings)."""
372385
return read_findings(body)[0]
Collapse file

‎fork-ci/actions/pr-queue/review_judge.test.py‎

Copy file name to clipboardExpand all lines: fork-ci/actions/pr-queue/review_judge.test.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,19 @@ def group(name):
193193
return [v for v in FINDINGS if v['group'] == name]
194194

195195

196+
class StateLine(unittest.TestCase):
197+
"""has_state_line: what counts as a report's `state:` line (the review kit imports it; the gate parses
198+
`state_line` but does not enforce it yet)."""
199+
200+
def test_an_answered_state_line_outside_code_and_quotes(self):
201+
for body, said in (('state: a second run does nothing', True), ('**State:** fine', True),
202+
('- state: fine', True), ('STATE : fine', True), ('state:', False), ('state: ', False),
203+
('the state is fine', False), ('```\nstate: fine\n```', False), ('> state: fine', False),
204+
(' state: fine', False)):
205+
with self.subTest(body=body):
206+
self.assertIs(rj.has_state_line(f'lens: code\n{body}\nblocker: none\n'), said)
207+
208+
196209
class Findings(unittest.TestCase):
197210
def test_every_shared_findings_vector(self):
198211
for v in FINDINGS:

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.