test_internal_row_ids_are_stripped_from_envelope_and_rows¶
Tests › tests/test_wire.py
What this test is for
Why it exists
A GRADED ANSWER PUBLISHED ONE AS A SOURCE LOCATION. An index-arm run wrote `programs/ssl/ssl_pthread_server.c:2244` as a citation; the file is 484 lines and 2244 was a `rowid`. The answer even hedged "per index rowid", so the model half-knew and wrote it anyway — which makes this a payload-shape defect rather than a model slip.
Given
class _IdBearing: """@brief A row and envelope that really do carry an internal id. @version 1""" rowid: int = 99 name: str = "callee" line_start: int = 7class _IdEnvelope: """@brief Envelope carrying an id of its own plus id-bearing rows. @version 1""" rowid: int = 42 subject: str = "thing" callers: tuple[_IdBearing, ...] = (_IdBearing(),)
When
out = wire.one(_IdEnvelope())
Then
- ✓ out is not None
- ✓ out does not contain "rowid"
- ✓ out["callers"][0] does not contain "rowid"
- ✓ out["subject"] equals "thing"
- ✓ out["callers"][0]["name"] equals "callee"
- ✓ out["callers"][0]["line_start"] equals 7
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
Look up one name: everything the index holds about it · 7 of 226 steps
… 27 earlier steps
… 188 later steps
2 more
- clew — `main` (clew/cli.py) · 7 of 400 steps
- `main` (scripts/export_parity.py) · 7 of 203 steps
tests/test_wire.py:208 · its file's page
What it checks (6)
assert out is not Noneobservesoneviaoutassert "rowid" not in out, "an internal row id must not be served on the envelope"observesoneviaoutassert "rowid" not in out["callers"][0], "nor inside a neighbour row"observesoneviaoutassert out["subject"] == "thing", "stripping must not remove real envelope fields"observesoneviaoutassert out["callers"][0]["name"] == "callee", "nor real row fields"observesoneviaoutassert out["callers"][0]["line_start"] == 7, "a genuine int field must survive"observesoneviaout
Where the product reaches it
dossier→subject_payload→_flatten_subject→one(flow)
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-001 measured