Skip to content

refactor(channels): drop the comments that narrate or defend the code, keeping one-line WARNINGs for outside footguns - #502

Open
AVGVSTVS96 wants to merge 3 commits into
mainfrom
comments-channels
Open

AVGVSTVS96 wants to merge 3 commits into
mainfrom
comments-channels

Conversation

@AVGVSTVS96

Copy link
Copy Markdown
Owner

Clears the comments out of bin/job.ts, bin/away.test.ts and 36 files under channels/, as Landmines' comment rule wants. These files had 93 comments; 32 are left, and each one is a one-line SAFETY: on a type assertion or a one-line WARNING: about a footgun from outside hex (Telegram's widget and getUpdates limits, T3 Code's private API and database, Buzz Desktop, NIP-AF, discord.js, iikb's read timeouts, a Siri Live Activity cut-off). tools/oxlint/allowances.json shrinks to match.

  • Narration and design prose: deleted, along with the no-comments disable line each one sat behind. Where a longer comment stated a real limit from outside hex, it's now a one-line WARNING: with its link.
  • channels/iikb/door.ts: its header said the door must import nothing from hex, because bin/hex swaps a running door only when that file changes. A test in door.test.ts now checks this, so the comment could go.
  • Workaround fixed, in its own commit: channels/voice/board.ts cast T3's boundary check to (id) => false "until hub/running.ts types boundary as returning boolean". hub/running.ts has typed it that way since refactor: strict types, type-aware lint and zod at hex's boundaries #209, so the cast and its helper are gone.

Behavior is otherwise unchanged. channels/buzz/bot.ts and channels/discord/bot.ts are left alone: other open work is changing them.

Not fixed here

  • channels/voice/reconnect.test.ts: the tests after "with no call live" run one at a time because they rely on timing. They hold the engine to a window of time, wait by sleeping and race its retries. Twenty engines at once on four cores made one of them fail. The right fix is to drive them from the engine's own signals, or a clock the test controls, so they can run with test.concurrent like the rest.
  • channels/voice/questions.test.ts: built() gets to the private build with questions["build"]() to know when the view is current. The right fix is a public "current" promise, or a change event, on Questions.

The allowances.json count edits are only here while the per-file counts exist. Once #500 lands, this branch rebases and drops them.

@vercel

vercel Bot commented Nov 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hex Ready Ready Preview Nov 18, 2026 9:28pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — e0b26b22 Deployed Nov 18, 2026 by vercel[bot]
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