Skip to content

fix: release workflow grep lookbehind error - #3

Merged
ranxianglei merged 1 commit into
masterfrom
2026-08-01_fix-release-workflow
Aug 1, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-08-01_fix-release-workflow

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Bug

Release workflow used grep -oP '(?<=Merge pull request #\d+ from )' — GNU grep doesn't support variable-length lookbehinds. Caused is_release=false on PR #2 merge, skipping npm publish.

Fix

Replaced grep lookbehind with sed -n 's/...//p' extraction. Same logic, no PCRE dependency.

Also applied to acp-kernel.

Test

0.1.1 already published manually (legacy fallback). This fix ensures future release PRs auto-publish.

The lookbehind (?<=Merge pull request #\d+ from ) uses variable
length which GNU grep -P cannot handle. Replaced with sed.

Fixes: PR #2 merge did not trigger npm publish
@ranxianglei
ranxianglei merged commit baa020f into master Aug 1, 2026
3 checks passed
ranxianglei added a commit that referenced this pull request Aug 4, 2026
…poke

Addresses reviewer findings (del_msethbdb_netm):

M1 (rpc leak): setContext gated on ctx.hasUI, but hasUI is true in rpc
mode — rpc's setWidget emits extension_ui_request notifications to the
RPC client. So the widget pushed ~1Hz chatter to every RPC client while
delegates ran, contradicting the stated 'tui-only' design. Gate on
ctx.mode !== "tui" instead (the exact string; types.d.ts: 'Use "tui" to
guard terminal-only UI'). print/json already skipped (hasUI false), rpc
now correctly skipped too.

m1 (missing poke): child.on('error') flipped run.status running→failed
without a poke (the one status transition criterion #3 asked to verify).
A spawn-level error (EPIPE/ENOENT) left the run in the widget until the
next 500ms tick. Add poke() after run.waiter?.() in the error handler.
All status writes are now covered.

m2 (always-ticking timer): the 500ms interval ran for the whole session
even when idle. Now refresh() stops the timer when the run list goes
empty (after clearing the widget), and poke() restarts it on a new spawn.
An idle TUI no longer ticks forever.

m3 + n1 (dead stale-ctx guard + dead ctxMode variable): the stale-ctx
catch branch could never fire — the widget caches the raw uiContext
object, bypassing ctx.ui's getter where assertActive runs, and
setWidget never throws 'stale' anyway. Real teardown is dispose() via
session_shutdown. Dropped the isStaleExtensionContextError function,
the ctxMode variable, and the stale catch branch; the generic catch now
just clears ui + stops the timer (so setContext rebinds next time).

n2 (renderKey truncation mismatch): renderKey used raw task.slice()
while renderLines used truncateTask (collapses newlines + adds …). Use
truncateTask in both for consistency.
HangxiangMa pushed a commit to HangxiangMa/billion-context-pi that referenced this pull request Sep 10, 2026
…anxianglei#344)

When the ranxianglei#3 rewrite guard rejects a re-condense, the recovery hint only
covered message-type ranges. With the session's actionable mass being
tier blocks, repetition-prone models were left hunting — re-hitting the
guard and burning turns. Compute the current tier-ready span from the
pre-compression state (T3 condensation if active T2 blocks >=
tier3Trigger, else T2 distillation if active T1 blocks >=
tier2Trigger) and append it to the rejection.
ranxianglei pushed a commit that referenced this pull request Sep 10, 2026
Issue #317 seam #3: key nudge-dedup and compress-failure bookkeeping by session id.

nudgeShownTurns was a process-global Set and the compress-outcome tracker a single global slot; under a host that runs multiple concurrent sessions through one extension instance (Prime's inline RLM model) they clobbered each other. Both are now Map<sid,...>, matching the existing overflow/throttle/dead isolation pattern. Six methods take a sid; index.ts/compress-tool.ts pass it, and session_shutdown drops each session's entries.

Single-session behavior is unchanged (full suite green); three new tests cover same-turn cross-session isolation. Part of #317.
HangxiangMa pushed a commit to HangxiangMa/billion-context-pi that referenced this pull request Sep 21, 2026
Issue ranxianglei#299: Pi's export/import only moves the session transcript, so the
ACP state sidecar (<id>.jsonl.acp.json) is lost and the parentSession
header is dropped — imported sessions come back with no compressed blocks.

This lands fix direction ranxianglei#3 from the issue: user-facing docs explaining
that migrating a session requires carrying both files (or the whole
sessions directory), plus the clone/fork parentSession caveat.

The upstream root fix (host carrying the sidecar through import/export)
is tracked separately in ranxianglei#299.
HangxiangMa pushed a commit to HangxiangMa/billion-context-pi that referenced this pull request Sep 21, 2026
…anxianglei#344)

When the ranxianglei#3 rewrite guard rejects a re-condense, the recovery hint only
covered message-type ranges. With the session's actionable mass being
tier blocks, repetition-prone models were left hunting — re-hitting the
guard and burning turns. Compute the current tier-ready span from the
pre-compression state (T3 condensation if active T2 blocks >=
tier3Trigger, else T2 distillation if active T1 blocks >=
tier2Trigger) and append it to the rejection.
HangxiangMa pushed a commit to HangxiangMa/billion-context-pi that referenced this pull request Sep 21, 2026
…nxianglei#317)

Issue ranxianglei#317 seam ranxianglei#3: key nudge-dedup and compress-failure bookkeeping by session id.

nudgeShownTurns was a process-global Set and the compress-outcome tracker a single global slot; under a host that runs multiple concurrent sessions through one extension instance (Prime's inline RLM model) they clobbered each other. Both are now Map<sid,...>, matching the existing overflow/throttle/dead isolation pattern. Six methods take a sid; index.ts/compress-tool.ts pass it, and session_shutdown drops each session's entries.

Single-session behavior is unchanged (full suite green); three new tests cover same-turn cross-session isolation. Part of ranxianglei#317.
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