symfonic.capabilities.memory.capture¶
capture ¶
Opt-in, in-process score observations for paired local evaluation.
Source record identities exist only in this collector to join two executions.
Only :class:PairedCandidateDecision may leave it. Nothing is persisted or
exported by this module, and the default coordinator never constructs one.
LocalCandidateCapture ¶
One route's one-query observations, retained only until local pairing.
A capture is deliberately single-use. Reusing it across turns could join unrelated candidates that happen to have the same source identity.
Activation-only selected rows retain actual traversal provenance and have no candidate gate score.
Source code in src/symfonic/capabilities/memory/capture.py
finalize ¶
Resolve hydration inclusion after an eager, verbatim block exists.
Later prompt assembly can still reject this contribution. This call supports the direct declared block and refuses ambiguous line matches; operators must verify downstream assembly separately.
Source code in src/symfonic/capabilities/memory/capture.py
invalidate ¶
Discard an ambiguous capture without affecting the retrieval turn.
Source code in src/symfonic/capabilities/memory/capture.py
observe ¶
observe(query: MemoryQuery, candidates: tuple[Candidate, ...], kept: tuple[RetrievedMemory, ...], selected: tuple[RetrievedMemory, ...], observed: list[tuple[str, float | None, str]] | None, activated: tuple[RetrievedMemory, ...] = (), activation_nodes: tuple[ActivatedNode, ...] = (), *, linked: tuple[LinkedRecall, ...] = ()) -> None
Record the gate and rank selection before hydration's final bound.
Source code in src/symfonic/capabilities/memory/capture.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
observe_provider_messages ¶
Observe the exact message argument at one model call, once.
Source code in src/symfonic/capabilities/memory/capture.py
PairedCandidateDecision
dataclass
¶
PairedCandidateDecision(query_id: str, candidate_id: str, legacy_raw_score: float | None, native_gate_score: float | None, native_score_is_final: bool, legacy_present: bool, native_present: bool, legacy_coordinator_admitted: bool, native_coordinator_admitted: bool, legacy_gate_reason: str | None, native_gate_reason: str | None, legacy_rank_selected: bool, native_rank_selected: bool, legacy_activation_selected: bool, native_activation_selected: bool, legacy_hydration_included: bool, native_hydration_included: bool, legacy_provider_visible: bool | None = None, native_provider_visible: bool | None = None, legacy_linked_selected: bool = False, native_linked_selected: bool = False)
Numeric-only row with fresh IDs unrelated to source identities.
Legacy coordinator admission is the post-port gate, not the legacy engine's earlier retrieval/admission decision.
pair_captures ¶
pair_captures(legacy: LocalCandidateCapture, native: LocalCandidateCapture) -> tuple[PairedCandidateDecision, ...]
Join within this process, then release only fresh-ID numeric rows.