Skip to content

Fix ten bugs: issue triage, push gate, worktree hooks, web links, labels, CRLF, listening window, key terms, notice clock, evals pairs - #615

Merged
alexkroman merged 11 commits into
mainfrom
claude/admiring-hypatia-w5zuqt
Dec 5, 2026
Merged

alexkroman merged 11 commits into
mainfrom
claude/admiring-hypatia-w5zuqt

Conversation

@alexkroman

@alexkroman alexkroman commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

No open issues were filed, so this fixes ten real defects found by reviewing the code, one commit each, each with a test.

Tooling

  1. open-issues.sh drops an unlabelled issue's fields. jq's @tsv writes an empty labels field, and tab is IFS whitespace, so read merged it. The "Blocked on #N" line and the "builds on" PRs vanished. Fields are now joined on US (0x1f).
  2. push-gate.sh gated any command mentioning "push". Examples: git commit -m "fix push gate", git stash push, git log --grep push. A red check.sh then blocked the commit. Now only global options may sit between git and push.
  3. swift-budgets.sh skipped worktree edits. $CLAUDE_PROJECT_DIR is the main checkout, so every check dropped the file as out of scope. The root is now taken from the file's own checkout when it shares the project's git common dir, as push-gate.sh does. A follow-up commit compares physical paths: macOS's /var is a symlink to /private/var, and git reports the resolved root, so a file reached through a symlink was dropped the same way. The new test caught this on CI.

Engine and SDK

  1. AppLink.asksForWeb: "Open the Slack website." opened the Slack app. The sentence's period stuck to "website". Words now split at periods too.
  2. ScreenContext: element labels lost their "…". They were shortened to labelCap (120), then cut to 80 by quoted(), which removed the ellipsis. Labels of 81–120 characters were cut with no mark at all. The label is now flattened first, then shortened.
  3. SpeechSegmenter: no split at CRLF. "\r\n" is one Character, which a literal \n never matches. The regex now uses \R.

iPhone

  1. ListeningWindowMachine: an interrupted window never expired after "until stopped". If the length went from until-stopped to N minutes while interrupted, the resume scheduled no expiry, so the window (and in held mode the mic) stayed open. It now gets its end from now. The handler moves to +Moves to stay under file_length, which needs windowMinutes' setter to be internal.
  2. The key-term field accepted commas. "Acme, Inc" was stored as two terms, and termListIsFull checks room for only one, so the list could pass the 100-term cap. A typed comma is now dropped, and DESIGN.md is updated.
  3. The notice clock wasn't restarted after the keyboard came back. disappeared() and detach() cancelled noticeClock without clearing it, so apply never restarted it for the same .processing phase, and "Still transcribing…" came late. They now set it to nil.

Evals

  1. corpus.load overwrote supplied pairs whose sides match. "Don't over-edit" and casing-only pairs got synthetic disfluencies, against the module docs. Bare references are now marked at the source, and only those are injected.

Not changed (needs a decision)

  • Over-cap fallback on a dropped connection. The dictation docs say the live route's 413 can arrive as a dropped connection, but the fallback only triggers on a 413 with audio_too_large. Widening that touches a settled decision.
  • 404 as a rejected key. isKeyRejected treats 404 as a bad key, while the current docs list only 401. This should be re-measured against the live route before changing.

How it was tested

  • scripts/check.sh --portable passes. It covers:

    • the hook and gh-script suites, including the new cases (the worktree case fails without the fix)
    • the evals ruff, mypy and pytest checks with the coverage gate
    • the Linux engine slice, including the new AppLinkTests cases
  • Fixes 5 and 6 were checked with standalone Linux builds of the changed files.

  • The new tests for fixes 5–9 live in BlurtEngineTests and BlurtiOSTests, which only build on macOS, so CI verifies them.

  • scripts/check.sh passes (or CI will, if I'm not on a Mac)

  • I read AGENTS.md and this doesn't reintroduce anything
    deliberately removed

  • Docs updated if behavior changed

https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ


Generated by Claude Code

claude added 10 commits December 5, 2026 05:06
jq's @TSV writes an empty labels field for an issue with no labels, and tab
is IFS whitespace, so read merged it and shifted the first body line into
labels and the refs into first: the 'Blocked on #N' note and the 'builds on'
PRs vanished, and the issue looked free to pick up. Join on US (0x1f), which
read keeps empty, and test an unlabelled blocked issue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
The detector allowed any text between git and push, so git commit -m
"fix the push gate", git stash push and git log --grep push all ran the
~20 s check, and a red check.sh blocked the commit outright. Allow only
global options between them, and test those three as non-pushes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
From a git worktree $CLAUDE_PROJECT_DIR is still the main checkout, so the
edited file's path never began with the root and the size, lint-lite and
test-clock checks all dropped it as out of scope: an Edit/Write in a worktree
was never checked. Take the root from the file's own checkout when it shares
the project's git common dir, as push-gate.sh does, and test it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
asksForWeb split words at non-letters but kept periods, so the transcript's
own period stuck to its last word: "Open the Slack website." never matched
" website ", and preferApps turned the planned slack.com into the Slack app.
Split at periods too; a domain is still caught by the regex on the raw text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
promptText shortened an element's label to labelCap (120) with a closing
ellipsis, then quoted() cut the result to maxLabelCharacters (80), so the
planner saw 80 bare characters: the ellipsis was cut off, and an 81-120
character label was cut with no mark at all. Flatten the whole label, then
shorten it; maxLabelCharacters still caps the app name and window title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
The boundary regex's literal \n never matches "\r\n", which Swift Regex
treats as one Character, nor a bare \r, so a CRLF selection's heading ran
into its first sentence when read aloud. Match \R, any line break.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
…pped

With the length at until-stopped an interrupted window has no end. Setting a
length while it stayed interrupted only stored the number, so the resume
scheduled nothing and the window (and in held mode the live mic) stayed open
until the next dictation ended, its status still reading until-stopped. Give
the paused window its end from now, as an open one gets. The handler moves to
+Moves to keep the file under SwiftLint's length limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
The list is stored comma-separated, which is why a highlighted word with a
comma is never offered. The term field took one anyway: "Acme, Inc" was
saved as two terms, and termListIsFull checks room for one, so at 99 terms
a typed "Acme, Inc, Globex" took the list to 102 with a check shown for
terms no dictation sends. Drop a typed comma, as DESIGN.md now says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
apply restarts the notice clock for an unchanged phase only when there is
none (noticeClock == nil). disappeared() and detach() cancelled the task but
kept it, so a keyboard back on screen mid-transcription re-applied the same
.processing snapshot, found a dead task, and never scheduled "Still
transcribing…": it showed only when some other change redrew the bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
load() decided which utterances to inject by comparing the normalized
sides, because a bare jsonl line came through as (line, line). So a supplied
don't-over-edit row, or a casing-only pair, was overwritten with synthetic
disfluencies, against the module's own docs. Mark a bare reference at the
source (a None input side) and inject only those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
@alexkroman
alexkroman enabled auto-merge December 5, 2026 05:17
git rev-parse reports a checkout's resolved root, so a file reached through a
symlink (macOS's /var is /private/var, where the hook test's worktree lives)
never began with it and was dropped as out of scope: the new worktree test
failed on CI though it passed in a Linux sandbox. Resolve the file and the
project dir physically before comparing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1W3zrb7CmbHtzzA3QJ
@alexkroman
alexkroman added this pull request to the merge queue Dec 5, 2026
Merged via the queue into main with commit ff3e9d4 Dec 5, 2026
20 checks passed
@alexkroman
alexkroman deleted the claude/admiring-hypatia-w5zuqt branch December 5, 2026 06:34
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.

2 participants