Skip to content

docs(socketwatch): de-stale the 2b/2c prose - targeting reads the live map#43

Merged
donislawdev merged 1 commit into
masterfrom
docs/socketwatch-2c-prose-drift
Jul 25, 2026
Merged

docs(socketwatch): de-stale the 2b/2c prose - targeting reads the live map#43
donislawdev merged 1 commit into
masterfrom
docs/socketwatch-2c-prose-drift

Conversation

@donislawdev

Copy link
Copy Markdown
Owner

What and why

Found during an engineering review of the concurrency layer. Chunks 2b/2c/2d landed in #38, so
ProcessTargeting has resolved against the live SocketWatcher map for a while now - but four
comments 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.py deliberately does not check prose, so when 2c landed the
sentences 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 _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) and dropped the false framing, then named tests/test_targeting_socketwatch.py
    as 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 SocketEvent comment saying remote_ip/remote_port are
"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>) markers
checked against one list of open stage ids), since discipline alone produced four stale sites in a
single transition.

Checklist

  • python -m pytest tests passes 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.)
  • New behaviour has tests (see tests/ for the style). - n/a: no new behaviour; the existing
    guards test_socketwatch*.py / test_targeting_socketwatch.py already cover the contract
    the prose now describes correctly.
  • UI text goes through i18n keys, with both lang/en.json and lang/pl.json updated. -
    n/a: no UI text.
  • User-facing changes noted in CHANGELOG.md; technical ones and new tests in
    CHANGELOG-INTERNAL.md, under [Unreleased]. - internal only (convention 39): nothing about
    this is visible to a tester.
  • Commits follow Conventional Commits (type(scope): summary).
  • No version bump - the owner closes a version via VERSION.txt.

🤖 Generated with Claude Code

…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>
@donislawdev
donislawdev merged commit 7c9cdbb into master Jul 25, 2026
8 checks passed
@donislawdev
donislawdev deleted the docs/socketwatch-2c-prose-drift branch July 25, 2026 06:57
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