Skip to content

fix(cli): wire lint into local and CI checks (reopen of #1247) - #1258

Merged
lilyshen0722 merged 4 commits into
mainfrom
fix/cli-lint
Aug 26, 2026
Merged

fix(cli): wire lint into local and CI checks (reopen of #1247)#1258
lilyshen0722 merged 4 commits into
mainfrom
fix/cli-lint

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Re-press of #1247, which was stacked on #1246's branch and auto-closed when that branch merged and deleted (the stacked-PR trap; #1251's retarget guard now exists but cannot resurrect an already-closed PR). Same head commit f95c1be, now based on main so CI runs against the real base for the first time — which is exactly what the stacked-PR memory warns stacked children never get.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TdEJoXUmbHmW5TFk7hfkbK

lilyshen0722 and others added 4 commits August 25, 2026 01:15
…one attaching

Sam (57691) asked to fold "prose overflow goes in a thread, not an attachment"
into the cue. The cue already says it, verbatim, since #1176. The behaviour he
watched all day continued anyway, and the reason is that the cue was aimed one
layer above the thing doing it: agents were not choosing to attach.

`deliverChatReply` decides the delivery mode, and its ladder ended at upload:

    fits in one message         -> post
    splits into <= maxChunks    -> post the chunks
    longer than that            -> upload the whole text as a file

Every `<agent>-reply-<eventId>.md` card in this pod came from that last rung,
including two of mine today. The function predates threads and had no concept
of one. So the cue promised a behaviour the wrapper actively contradicted —
which is @sprint-review's degrades-open caveat exactly: the cue should promise
what the kernel enforces, and here it could not be obeyed at all.

Adds the rung Sam specified — post the headline to the channel, continue the
rest under it with threadRootId — and keeps attach for the case it was always
right for: a single indivisible unit over attachThreshold (a long fence, an
unbreakable run). That is a document by construction; prose that outgrew a
message is not.

Two of this suite's existing tests caught a real bug in the first draft. The
attach rung also leads with chunks[0], so falling through after a successful
headline post duplicated the opening line in the room. The recovery now tracks
whether the headline landed: if it did, post the REMAINDER top-level
(thread-fallback) rather than the whole text again; if the headline itself
failed, nothing reached the room and attach is free to lead as before.

Two existing tests changed meaning rather than being bent to pass, and both
say so at their call site. Their fixtures are prose, which is precisely the
case this reclassifies — their INTENT (nothing is cut; flood beats truncation
or silence) is preserved and now carried by the thread.

Probe: reverting the rung reddens the six behavioural tests and leaves the
indivisible-oversize control green. Suite 61 passed.

Version 0.1.18 -> 0.1.19. Note this collides with #1215's bump if both land —
whichever merges second needs a re-bump, since the guard compares against main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rom 1

`headlinePosted` was a boolean, so the recovery always resumed at
`chunks.slice(1)`. A boolean can only distinguish "nothing posted" from
"something posted"; it cannot say how much.

Fail a continuation at chunk 3 and chunks 1 and 2 are already in the thread —
the fallback then posts them again top-level, and the reader sees them twice.
That is the duplicate-opening bug this rung exists to prevent, one index
further along.

The suite did not catch it because both existing failure tests throw at the
root-id step, before any continuation has posted. At that instant "something
posted" and "one thing posted" are the same statement, which is exactly when a
boolean stands in for a count without looking wrong.

Now a counter, incremented after each successful post, with the fallback
resuming at `chunks.slice(posted)`. New test fails the 4th post and asserts
every chunk arrives exactly once; reverting to `slice(1)` reddens it alone
(1 of 62).

Found by @sprint-review gating #1217. Pushed onto this branch rather than a
second PR — the head had not moved in three hours.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lilyshen0722
lilyshen0722 merged commit 2921ba5 into main Aug 26, 2026
16 checks passed
@lilyshen0722
lilyshen0722 deleted the fix/cli-lint branch August 26, 2026 07:44
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