Skip to content

chore(watch): sweep the harness surfaces left claiming the 60s poll floor - #422

Merged
github-actions[bot] merged 2 commits into
mainfrom
chore/watcher-floor-sweep
Oct 7, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
chore/watcher-floor-sweep

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The umbrella leg of the watcher-interval cutover. opencharly/marketplace#426 raised the watcher
family's POLL_FLOOR and all three defaults to 300s; this change moves the surfaces in THIS repo
that still state or implement the 60s floor, so they do not go stale the moment it lands (R1/R5).

  • .opencode/lib/watch.ts - POLL_FLOOR = 60 becomes 300. This is a duplicate implementation
    of the same policy (R3), and DEFAULT_INTERVAL_S derives from it, so the cadence and the clamp
    move together.
  • .opencode/instructions.md - the documented constant, POLL_FLOOR = 300, "sub-300s".
  • scripts/check-opencode-coord.mjs - the gate pins the policy, so it moves with it: its
    assertion matched the literal /below the 60s floor/ (that message is built from the constant),
    and seven fixtures drove coord_watch with interval: 60, which the new floor correctly refuses;
    the "keeps a valid interval" clamp case used 120, which the new floor clamps to 300. Both are
    fixed here.
  • .pi/extensions/watch.ts - a functional constant, not just a comment: const INTERVAL = "60" is
    the interval handed to the floor-enforcing watcher, so with a 300s floor the pi watch could not arm
    at all (exit 5). Now "300".
  • .reasonix/watch.items and .dsh/README.md - the comments that quote the cadence and the floor.

STALL_MIN is untouched everywhere: it is the stall window in MINUTES, not the interval.

Refs opencharly/marketplace#425.

How tested

Run on this head (c6fa738), every command rc=0:

$ for g in check-opencode-coord check-pr-watch check-pi-watch check-harness-config check-root-refs check-opencode-plugin; do node scripts/$g.mjs >/dev/null 2>&1 && echo "PASS $g" || echo "FAIL $g"; done
PASS check-opencode-coord
PASS check-pr-watch
PASS check-pi-watch
PASS check-harness-config
PASS check-root-refs
PASS check-opencode-plugin
$ node scripts/check-harness-config.mjs --self-test   -> PASS
$ bash scripts/check-bed-watch.sh --self-test         -> PASS (15 assertions)

The commit also passed the repo's own pre-commit umbrella gate (policy B, the self-tests, the
opencode/pr-watch/pi gates, task contexts), ending pre-commit: OK.

The claim sweep, executed:

$ grep -rn -E "(INTERVAL|interval)[^A-Za-z]{0,8}(=|:)[[:space:]]*[\"']?60([^0-9]|$)" .pi/ .opencode/ .reasonix/ .dsh/ scripts/*.mjs
  (no output: no interval is assigned 60)

This sweep is VALUE-keyed, which the first revision's claim-keyed pattern was not: the previous
pattern (POLL_FLOOR = 60|poll floor 60s|...) could not match const INTERVAL = "60", so its "no
survivor" was not evidence - and a functional 60s survivor shipped in that head. Every remaining 60
in the touched files is enumerated here, so a reader can check them rather than trust the claim:

$ grep -rn -E '(^|[^0-9])60([^0-9]|$)' .pi/extensions/watch.ts .reasonix/watch.items .dsh/README.md .opencode/lib/watch.ts .opencode/instructions.md
.pi/extensions/watch.ts:54:const STALL_MIN = "60";
.pi/extensions/watch.ts:282:      note(latestCtx, "watch: another watcher holds the lock (exit 6) - retrying in 60s");
.opencode/lib/watch.ts:70:export const DEFAULT_STALL_MIN = 60;
.opencode/lib/watch.ts:490:    Math.floor((opts.nowEpoch - cur.updatedEpoch) / 60) >= opts.stallMin

STALL_MIN in both harnesses is the stall window in MINUTES; watch.ts:282 is a one-off lock retry,
not the poll cadence; :490 is minute arithmetic on the stall window. None is an interval.

The gate failed before the fixtures moved, and that failure is the R7 evidence: the same
check-opencode-coord.mjs reported 12 assertions failing, every one of them caused by a fixture
below the new floor (coord_watch: interval 60s is below the 300s floor - refusing). Reverting the
fixture edits reproduces it.

NOT run, and said so rather than claimed: no R10 bed. No runtime target is touched - harness config,
docs and a gate's fixtures - so no bed is owed.

Disposition of the BLOCK on d04e727

  1. A1/R5/R1 - the .pi constant survived and the body mis-accounted the file. const INTERVAL
    was "60" directly under the comment this PR rewrote; it is the value passed to the
    floor-enforcing watcher, so a 300s floor would refuse it (exit 5) and the pi watch could not arm.
    Now "300". The body no longer calls the file "docs and comments": it carries a functional
    constant, and the sweep is value-keyed above.
  2. A1/R5/R1 - the reasonix per-minute cadence claim. "one batched GraphQL poll per minute"
    survived beside the raised floor; it now reads "per interval - 300s by default", and the residual
    enumeration above shows the remaining 60s are minutes, not intervals.

Both were invisible to the first sweep because it was claim-keyed. That is the lesson this body now
encodes: a sweep of VALUES must match the value, not the phrasing.

Rulebook compliance

  • R0 - /charly-internals:git-workflow and /charly-internals:marketplace loaded, and the
    repo's own pre-commit gate ran the change-class checks.
  • R1 - the gate failure this change caused was RCA'd rather than parked: the fixtures and the
    clampInterval(120) case were below the new floor, and the assertion was pinned to the old
    literal. All three are fixed above.
  • R2 - nothing deferred silently: the one remaining leg (the generated skill text owned by
    layer-charly-internals, then the refs bump and corpus regeneration) is named in
    marketplace#425 and carried in the session backstop.
  • R3 - opencode's poller is a DUPLICATE of the marketplace policy; this moves it in lockstep
    rather than letting two implementations of one rule diverge.
  • R4 - N/A - no workaround: the floor is raised, not bypassed, and nothing retries around it.
  • R4a - N/A - no product behaviour is routed around; the constant, its gate and its docs move
    together in one change.
  • R5 - the claim-keyed sweep is pasted above with its command and its empty output.
  • R6 - no destructive git action, no bypass; the commit ran through the repo's own hook.
  • R7 - the coverage fails without the change: the gate's 12-assertion failure is reproduced by
    reverting the fixture edits, and the assertion moves with the constant it describes.
  • R8 - N/A - no label, plan, config or generated artifact is emitted by this change.
  • R9 - committed with the worktree-local CalVer build (./bin/charly 2026.279.2047), which the
    pre-commit gate requires.
  • R10 - N/A - no runtime target: harness config, comments and a gate's fixtures; no image, VM,
    pod or deploy is affected, so no bed is owed.

Change classification

Harness configuration, comments and gate fixtures: .opencode/lib/watch.ts,
.opencode/instructions.md, .dsh/README.md, .reasonix/watch.items, .pi/extensions/watch.ts,
scripts/check-opencode-coord.mjs. No Go, no schema, no pin, no generated artifact, no runtime
target. Tier: fully tested and validated - the affected gates and the repo's pre-commit gate all
passed on this head, and the changed behaviour was executed live above.

Agent: dsh-catchup-reconcile
Assisted-by: DSH DeepSeek V4.1 Flash (fully tested and validated)

…loor

marketplace#426 raised POLL_FLOOR and all three watcher defaults to 300s. Its
sibling legs in this repo still stated the old floor, so they go stale the moment
it lands (R1/R5 claim sweep):

- .opencode/lib/watch.ts: POLL_FLOOR 60 -> 300. This is a DUPLICATE implementation
  of the same policy (R3); DEFAULT_INTERVAL_S derives from it, so the poll cadence
  and the clamp move together.
- .opencode/instructions.md: the documented constant.
- scripts/check-opencode-coord.mjs: the gate PINS the policy, so its assertion
  (`/below the 60s floor/`) and its seven sub-floor fixtures move with it - the
  fixture intervals were 60 (now refused), and the "keeps a valid interval" clamp
  case used 120, which the new floor correctly clamps.
- .dsh/README.md, .reasonix/watch.items, .pi/extensions/watch.ts: the docs that
  quote the floor.

STALL_MIN is untouched everywhere (minutes, not seconds).

Agent: dsh-catchup-reconcile
Assisted-by: DSH DeepSeek V4.1 Flash (fully tested and validated)
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: d04e7273ff167e14a4ffca2d76f5bb703ad3ea89 (branch: chore/watcher-floor-sweep)

Change class: harness config (.ts) + docs + gate fixtures — code + docs, not docs-only.

Comment thread: empty (0 comments) — nothing to disposition.

Blocks

  1. R5 / A1 / R1 — .pi/extensions/watch.ts:52-53 — the sweep missed the live 60s interval, and the body mis-accounts the file as comment-only.
    The diff edits the comment on line 52 to assert gh_watch.sh now "refuses a sub-300s interval", but leaves const INTERVAL = "60"; (line 53) unchanged directly beneath it. The comment itself binds INTERVAL to "the watcher's poll floor" — so either INTERVAL is the poll interval the extension hands to the floor-enforcing watcher (in which case 60 is now below the 300s floor and the pi watcher cannot arm — precisely the "surface that still implements the 60s floor" the PR claims to sweep), or the updated comment now contradicts the constant it annotates (R1 comment-vs-reality divergence). Either way the body's classification of .pi/extensions/watch.ts as "the docs and comments that quote the floor" is wrong: the file carries a functional constant that should have moved with the floor. Note the opencode default was moved (DEFAULT_INTERVAL_S = POLL_FLOOR = 300), so the pi default is an un-swept survivor of the same change.
    The body's pasted sweep cannot catch this: the pattern POLL_FLOOR = 60|poll floor 60s|60s poll floor|sub-60s interval|below the 60s floor is claim-keyed and cannot match the value INTERVAL = "60", so "no output: no survivor" is not evidence the value was swept.
    Fix: set INTERVAL = "300" (or prove it is not the poll interval and correct the comment accordingly), and re-run the sweep with a pattern that matches the value, not just the phrasing.

  2. R5 / R1 — .reasonix/watch.items:16 — a per-60s cadence claim survives beside the raised floor.
    Line 17 was changed to "a 300s poll floor", but line 16 (unchanged context in this hunk) still reads "one batched GraphQL poll per minute". A 60s (per-minute) poll cadence is now below the 300s floor, so the same comment block contradicts itself; the sweep pattern did not cover this phrasing.
    Fix: correct the per-minute cadence claim to match the 300s floor.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

…ld not match

Both raised by the current BLOCK, and both are real:

- .pi/extensions/watch.ts: `const INTERVAL = "60"` survived directly under the comment
  this PR corrected. It IS the poll interval handed to the floor-enforcing watcher, so
  with a 300s floor the pi watch could not arm at all (exit 5). Now "300". The claim-
  keyed sweep pattern could not match `INTERVAL = "60"`, so "no survivor" was not
  evidence - the sweep is now value-keyed.
- .reasonix/watch.items: "one batched GraphQL poll per minute" still claimed a 60s
  cadence beside the raised floor; corrected to per interval (300s by default).

STALL_MIN stays 60 in both harnesses - it is minutes, not the interval.

Agent: dsh-catchup-reconcile
Assisted-by: DSH DeepSeek V4.1 Flash (fully tested and validated)
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: c6fa738288663fa524c28abba93b11cd84bf61f5 (branch: chore/watcher-floor-sweep)

Change class: harness config (.ts) + docs + gate fixtures — code + docs.

Security screen: PASS — no secrets/egress/supply-chain; the gate edit updates fixtures to the new floor (sub-floor refusal test still uses interval: 5), no guardrail weakening.
Checklist: All applicable rules PASS or NA.

Comment dispositions (re-derived against current head c6fa738, not d04e727):

  • Comment 6037143095 (@github-actions[bot], BLOCK on d04e727) — both findings are FIXED in the current diff: (1) .pi/extensions/watch.ts now sets const INTERVAL = "300" (was "60"); (2) .reasonix/watch.items now reads "one batched GraphQL poll per interval - 300s by default". stale-superseded.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 7, 2026 11:44
@github-actions
github-actions Bot merged commit 56aecfe into main Oct 7, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 7, 2026
github-actions Bot pushed a commit to opencharly/layer-charly-internals that referenced this pull request Oct 7, 2026
opencharly/marketplace#426 raised POLL_FLOOR and all three watcher defaults to
300s, and opencharly/opencharly#422 swept the umbrella surfaces. This is the
SOURCE of the generated skill text that still stated the old floor
(`internals/skills/git-workflow/references/watch-and-wake.md`), so it is fixed
here in the owning entity rather than in the generated copy.

- the section heading: "one poll per minute" -> "one poll per five minutes"
- the FLOOR statement: POLL_FLOOR=60 / "defaults to 60s" / "sub-60s" -> 300s

NOT touched: the B2b.1 takeover-window FLOOR, which is 60 MINUTES - a different
knob, in the same reference.

Agent: dsh-catchup-reconcile
Assisted-by: DSH DeepSeek V4.1 Flash (fully tested and validated)
@aitrawog
aitrawog deleted the chore/watcher-floor-sweep branch October 7, 2026 12:05
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