Skip to content

docs: describe the readiness gate that exists, not the one that was deleted - #414

Merged
Yaraslaut merged 3 commits into
masterfrom
fix/355-dangling-header-citations
Sep 2, 2026
Merged

docs: describe the readiness gate that exists, not the one that was deleted#414
Yaraslaut merged 3 commits into
masterfrom
fix/355-dangling-header-citations

Conversation

@Yaraslaut

Copy link
Copy Markdown
Member

What this is

Five header comments cited tryFireImpl and SubscriberEntry. Neither name exists anywhere in the tree — git grep -w finds them only in the comments citing them.

The archaeology

The handler-side draft machinery tryFireImpl belonged to was deleted. Today BridgeHandler has no set<> (only setDefaultSession / setExecuteDeadline / setPrincipal), no draft, no entries, and no SubscriberState.

But the gate was not deleted — it moved. The readiness check tryFireImpl performed now runs in morph::flows::FlowSession::set<>:

// include/morph/forms/flows.hpp:267
if (::morph::model::ActionValidator<A>::ready(draft)) {
    fireStep<A>(std::move(draft), stepIndex);
}

and the comment five lines above it says so in as many words: "The readiness gate that used to live in the handler's draft machinery lives here now."

So these citations are repointed rather than deleted, which keeps the explanation each was carrying. ValidationError's "two execution sites reached without passing a client-side gate" arithmetic in registry.hpp is still exactly true — it was only naming the wrong gate.

The five sites

Site Change
core/bridge.hpp:2317 reactive counterpart of the request/reply validator gate -> FlowSession::set<>
core/registry.hpp:126 Doxygen, published APIValidationError's gate pair, renamed
core/registry.hpp:413 same gate pair, server dispatch path
forms/flows.hpp:189 dead SubscriberEntry + a false attribution (below)
tests/test_coverage_gaps.cpp:575 dead section marker removed

Two sites needed no successor name:

  • flows.hpp:189 attributed "exactly one SubscriberEntry per action type" to docs/spec/core/bridge.md's "Subscription semantics". That section says the opposite axis — "subscribe<R>(cb) is keyed on the result/state type, not on an action" — and its cardinality rule is "one callback per (handler, R)". The false attribution goes; the real constraint behind the AllDistinct<Steps...> assert is named instead: one slot of FlowSession's own std::tuple<Steps...> _drafts.
  • tests/test_coverage_gaps.cpp:575 was a bare section marker with no test under it, for a coverage gap in a deleted function. Its cited range bridge.hpp:498-499 is now mid-doc-comment on attachHandlerAsync, so the line numbers were stale too. Removed.

Verification

Comment-only: every changed line is a comment (git diff -U0 filtered for non-comment lines returns nothing).

  • scripts/check_spec_citations.sh — exit 0, "Prose lint OK: every pinned fact is still cited; no banned terminology found; every cited path resolves; every cited section exists" (720 references, 60 cited sections)
  • scripts/check_deprecated_markers.sh, check_test_type_names.sh, check_journal_stamps.sh — exit 0
  • Full clang-debug build under -Weverything (Clang 22.1.8, 29 flags, strict) — clean
  • ctest — full suite

Refs #355

🤖 Generated with Claude Code

https://claude.ai/code/session_0154xzWuBMPveLcdeUgydifb

Yaraslaut and others added 2 commits September 2, 2026 17:50
…eleted

Five header comments cited `tryFireImpl` and `SubscriberEntry`. Neither has
existed since the handler-side draft machinery was removed: `BridgeHandler`
has no `set<>`, no draft, no `entries`, and `git grep -w` finds both names
only in the comments citing them.

The mechanism was deleted, but the *gate* was not — it moved. The readiness
check that `tryFireImpl` performed now runs in `morph::flows::FlowSession::set<>`
(forms/flows.hpp:267), which fires a step only once `ActionValidator<A>::ready`
passes, and the comment directly above it says so. So these citations are
repointed rather than deleted, keeping the explanation they carried:

- core/bridge.hpp — the request/reply validator gate's reactive counterpart.
- core/registry.hpp (Doxygen, published API) — `ValidationError`'s "two
  execution sites, two client-side gates" arithmetic still holds with the
  gate named correctly.
- core/registry.hpp — the same pair of gates, in the server dispatch path.

Two sites needed no successor. flows.hpp attributed "exactly one
`SubscriberEntry` per action type" to bridge.md's "Subscription semantics",
which says the opposite axis — `subscribe<R>` is keyed on the result type,
not on an action — so the false attribution goes and the real constraint is
named: the slot is one element of `FlowSession`'s own `std::tuple<Steps...>`.
tests/test_coverage_gaps.cpp carried a bare section marker for a coverage
gap in a deleted function, with no test under it and a line range (498-499)
that is now mid-doc-comment on `attachHandlerAsync`; it is removed.

Comment-only: every changed line is a comment.

Refs #355

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154xzWuBMPveLcdeUgydifb
Two wording fixes from the simplify gate, both comment-only:

- bridge.hpp named `ActionValidator<A>::ready`, borrowing flows.hpp's
  template parameter into a file whose own parameter is `Action` — and the
  same comment says `ActionValidator<Action>::ready` four lines below.
- registry.hpp's reflowed Doxygen paragraph wrapped one line wider than the
  rest of its block.

Refs #355

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154xzWuBMPveLcdeUgydifb
@Yaraslaut Yaraslaut added the no docs update Skip the header<->spec sync gate for this PR label Sep 2, 2026
The code-review gate caught an inaccuracy in text this branch authored.
`std::tuple<Steps...>` does not give one slot per action type — it gives one
element per step position, so a duplicated `Steps` yields two elements and
nothing "collides on that single slot".

What a duplicate actually breaks is type-keyed access: `_drafts` is reached as
`std::get<A>(_drafts)` (flows.hpp:257, 258, 393), and `std::get<T>` is
ill-formed when `T` occurs more than once — which is exactly what the
`AllDistinct<Steps...>` static_assert enforces.
docs/spec/forms/workflows_navigation.md:315 already gives this reason.

Refs #355

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154xzWuBMPveLcdeUgydifb
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no docs update Skip the header<->spec sync gate for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant