docs(socketwatch): de-stale the 2b/2c prose - targeting reads the live map#43
Merged
Merged
Conversation
…e map Chunks 2b/2c/2d landed in PR #38, but four comments still said the SocketWatcher was unwired. Every one of those sentences was TRUE when written and acquired an expiry date nobody enforced, so a correct implementation sat next to prose that told the next session the opposite. check_notes.py deliberately does not check prose, so nothing went red. Comments and docstrings only - no behaviour change. - engine.py: the _socketwatch attribute comment and the _start_socketwatch docstring now point at _targeting_table() / _start_locked, where the poller-vs-watcher choice is actually made - socketwatch.py: the module docstring no longer claims the module is "in isolation ... NOT wired into the engine or targeting yet"; the lifecycle section header drops "in 2b" - tests/test_socketwatch_wiring.py: kept the part that is still true (this file covers the plumbing only), dropped the false framing, and named tests/test_targeting_socketwatch.py as the guard for the resolution contract - left alone on purpose: the SocketEvent comment about remote_ip/remote_port being "carried for the connection log later" - those fields are still unconsumed and their fate is a separate decision - CHANGELOG-INTERNAL.md entry (convention 39) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Found during an engineering review of the concurrency layer. Chunks 2b/2c/2d landed in #38, so
ProcessTargetinghas resolved against the liveSocketWatchermap for a while now - but fourcomments across three files still told the reader it was unwired ("NOT read by targeting yet -
that is 2c").
The interesting part is the failure mode, because it is not the one convention 5 usually catches.
Every one of those sentences was true when it was written. They carried an expiry date, and
nothing enforced it:
check_notes.pydeliberately does not check prose, so when 2c landed thesentences quietly became lies sitting next to correct code. That is the exact shape of drift that
sends the next session down the wrong path - it reads "not wired yet" and re-derives, or worse,
re-implements.
Prose only. No behaviour change, no executable line touched.
engine.py- the_socketwatchattribute comment and the_start_socketwatchdocstring nowpoint at
_targeting_table()/_start_locked, where the poller-vs-watcher choice is actuallymade.
socketwatch.py- the module docstring no longer claims the module is "in isolation ... NOTwired into the engine or targeting yet"; the lifecycle section header drops "in 2b".
tests/test_socketwatch_wiring.py- kept the part that is still true (this file covers theplumbing only) and dropped the false framing, then named
tests/test_targeting_socketwatch.pyas the guard for the resolution contract. The sentence was wrong in its frame, not in its
substance, so it was corrected rather than deleted.
Deliberately not touched: the
SocketEventcomment sayingremote_ip/remote_portare"carried for the connection log later". Those fields are genuinely still unconsumed, and whether
they get used or cut is a separate decision - rewriting that sentence now would only produce prose
that decision will rewrite again.
Follow-up, on its own branch: a mechanical guard for expiring prose (
PENDING(<id>)markerschecked against one list of open stage ids), since discipline alone produced four stale sites in a
single transition.
Checklist
python -m pytest testspasses locally. (660 tests, 0 failures, on an elevated shell -so the two known non-admin failures are absent rather than excused.
smoke_gui.py: OK.)tests/for the style). - n/a: no new behaviour; the existingguards
test_socketwatch*.py/test_targeting_socketwatch.pyalready cover the contractthe prose now describes correctly.
lang/en.jsonandlang/pl.jsonupdated. -n/a: no UI text.
CHANGELOG.md; technical ones and new tests inCHANGELOG-INTERNAL.md, under[Unreleased]. - internal only (convention 39): nothing aboutthis is visible to a tester.
type(scope): summary).VERSION.txt.🤖 Generated with Claude Code