HERMES-GIELIE/docs
nesquena-hermes ea8ee80a9c Debrittle #5513 session-SSE-contract RFC anchors to symbols (#5542)
The RFC (docs/rfcs/session-sse-contract-v1.md) cited hardcoded absolute
line numbers like `api/routes.py:12345-12346` and `api/routes.py:16177`,
and tests/test_issue4812_session_sse_contract_rfc.py validated those exact
lines against source. Any PR that shifted routes.py lines (e.g. #5543,
#5534) broke the test — a chronic brittle-failure class (#5542).

Root fix: anchor by SYMBOL, never by line number.

RFC:
- Strip every `api/routes.py:<NNNN>` / `<NNNN>-<NNNN>` and
  `api/streaming.py:<NNNN>` line-number suffix; keep the symbol name
  (route string, function/constant names) + the file, e.g.
  "_handle_session_events_stream() in api/routes.py".
- Update the inventory note to state names are the stable anchors and the
  RFC deliberately avoids line numbers so a source-layout shift can't
  invalidate the doc or its contract test.

Test:
- Rewrite the two line-anchor tests to assert (a) each cited symbol still
  exists in api/routes.py and (b) the RFC names that symbol — dropping the
  `api/routes.py:<line>` regex bounds-checks entirely. Invariant preserved:
  "the RFC's cited symbols are real and named in the doc", NOT "the cited
  line numbers are exact".
- Add test_rfc_uses_no_hardcoded_routes_line_numbers as a regression guard
  that fails if any `*.py:<line>` anchor is reintroduced into the RFC.

Proven de-brittled: prepending 31 lines to api/routes.py (scratch, reverted)
leaves all 34 tests green.

Refs #5542, #5513
2026-07-04 18:42:22 +00:00
..
architecture Gate settled anchor fallbacks by raw index 2026-06-30 08:00:54 +08:00
images
pr-assets
pr-media
rfcs Debrittle #5513 session-SSE-contract RFC anchors to symbols (#5542) 2026-07-04 18:42:22 +00:00
ui-ux
advanced-chat-setup.md docs(readme): re-sequence IA — pull Features up, consolidate access, extract niche docs 2026-06-01 02:26:18 +00:00
CONTRACTS.md docs(#4812): add session sse contract rfc 2026-07-03 23:16:16 -04:00
docker.md stage #4491: multi-container gateway URL (#4483) + v0.51.517 CHANGELOG 2026-06-19 19:09:00 +00:00
EXTENSIONS.md #5228: opt-in extension loopback proxy (#4747), rebased on master; union urllib imports 2026-07-01 23:49:25 +00:00
ISSUES.md
onboarding-agent-checklist.md
onboarding.md
remote-access.md docs(readme): re-sequence IA — pull Features up, consolidate access, extract niche docs 2026-06-01 02:26:18 +00:00
supervisor.md
troubleshooting.md
UIUX-GUIDE.md [HELD — independent review pending] Release v0.51.294 — stage-3401 (live-to-final redesign #3401 + 4 deep-review fixes) (#3741) 2026-06-06 12:12:37 -07:00
why-hermes.md
workspace-git.md
wsl-autostart.md