Skip to content

Recover slices 2 and 3: logger debug seam and outgoing-text sanitization - #9

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-5104-corbits-tag-add-loggerdebug-as-an-optional-diagnostic-only
Aug 2, 2026
Merged

Recover slices 2 and 3: logger debug seam and outgoing-text sanitization#9
TheGreatAxios merged 2 commits into
mainfrom
cl-5104-corbits-tag-add-loggerdebug-as-an-optional-diagnostic-only

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Recovers two upstreaming slices that were lost to a stacked-merge mistake, not to any problem with the code itself.

What happened

The three slices were stacked — each branched from the previous rather than from main. They were then squash-merged in order with branch deletion, which destroyed each subsequent pull request's base:

Both slices were therefore absent from main despite one showing as merged. No code was lost — #8's merge commit lives on this branch, so this branch now carries both.

What this contains

Both were reviewed and green individually before the mistake.

Note for the rest of the stack

Remaining slices should branch from main and land one at a time, or be merged bottom-up without deleting branches until the whole stack is in. Stacked bases plus branch deletion is what caused this.

warn() is for fail-soft conditions a host should see by default; debug()
is for diagnostic-only lines a host can opt into without adopting a full
log-level system. Optional so existing host loggers (which only
implement warn) keep working unchanged.
sanitizeOutgoingText strips a single wrapping HTML tag, drops a leading
leaked JSON/tool-call fence followed by real prose, unwraps a
whole-reply fence around plain prose, and un-escapes markdown escape
sequences. detectInfraErrorReply recognizes a raw infra-error dump (vs.
prose that merely mentions one) so resolveOutgoingText can swap in a
neutral, user-actionable message instead of letting it reach Slack
verbatim; the original is logged for diagnosis.

Wired into toTagThread's post() ahead of the convertMarkdown branch —
sanitization targets text that should never have reached Slack in that
shape at all, so it runs regardless of whether markdown conversion is
requested.
@TheGreatAxios
TheGreatAxios force-pushed the cl-5104-corbits-tag-add-loggerdebug-as-an-optional-diagnostic-only branch from 62f8311 to 7a6a855 Compare August 2, 2026 20:44
@TheGreatAxios
TheGreatAxios merged commit a2e18d5 into main Aug 2, 2026
1 check passed
@TheGreatAxios
TheGreatAxios deleted the cl-5104-corbits-tag-add-loggerdebug-as-an-optional-diagnostic-only branch August 2, 2026 20:45
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