Repository navigation
feat(obs): the PII boundary is enforced in flight, not trusted (P22) - #507
Merged
Merged
Conversation
§10.4 is the one prohibition this system has: telemetry carries identifiers
and counts, never attribute values. Three things already upheld it in code —
`sql_span` has no parameter argument so there is nowhere to put a bind value,
`er_span::attr` declares three names `Pii::Never`, and `sql_span_pii.rs`
fails the build if product code names one. All three are about what the code
does. None of them is a boundary.
This is the layer underneath: a `transform/pii_allowlist` processor whose
`keep_keys` drops every span attribute not named. An ALLOWLIST, so an
attribute nobody anticipated does not ship merely because nobody thought to
forbid it. Fail-closed by construction — forgetting an attribute loses a
field rather than leaking one, which is the right way round for an engine
whose payload is names and addresses. A denylist has the opposite failure
mode.
It sits BEFORE `tail_sampling`, which reads attributes — the `ui-interactions`
policy keys on `er.action` — and both precede `batch`, which would otherwise
hand the sampler trace fragments. A test asserts that ordering rather than
leaving it to whoever next edits the pipeline list.
## The list was measured, not derived
A scan of every span macro in the workspace found 37 names. Reading a REAL
exported Parquet file from the dev collector found eight more that
`tracing-opentelemetry` adds on its own: `busy_ns`, `idle_ns`, `thread.*`,
`code.*` and `target`. Keeping only the 37 would have silently dropped the
CPU-versus-wall-time split, which is among the most useful things on a stage
span — and the symptom would have been a field nobody could find, with the
code right and the deploy green.
That is the cost of a fail-closed allowlist and it is why the values file says
to look there first when an attribute goes missing.
## The gate, and what it caught
`collector_allowlist.rs` asserts three things: every span attribute the Rust
emits survives the allowlist, no `Pii::Never` name is admitted by it, and the
processor precedes sampling.
It immediately found `service.name` and `service.version`, which `init.rs`
sets as FIELDS on the process span — distinct from the resource attributes of
the same names. Without the gate the process span would have lost its own
identity while the resource kept it, which is the confusing half of a drop.
It reads both spellings of a span field: a bare `er.foo = …` and the
`{ attr::FOO } = …` form `sql_span` uses. Missing the second would have made
it blind to exactly the attributes that matter most.
Its honest limit is recorded in its own docs: SDK-added attributes appear in
no span macro, so nothing can derive them, and a dependency bump that renames
one will drop it again with no test failing. Re-measure after a bump.
make check exit 0.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This was referenced Nov 5, 2026
athvin
added a commit
that referenced
this pull request
Nov 5, 2026
* fix(ci): a platform-only change merges green and never deploys `deploy.yml` fires only on `workflow_run: [images]`, and `images` only runs when something that goes INTO an image changes. So a commit touching just `infra/k8s/**` builds nothing, `images` never runs, and this workflow never fires — while `obs_up.sh`, which applies those values, lives inside the deploy job. The result is a change that merges green and is simply never applied. Found by merging the collector's PII attribute allowlist (#507): committed, green, and absent from the cluster. Masked until then because every earlier observability change rode along with a Rust commit that did build an image, which carried the YAML with it. So `push` to main, filtered to `infra/k8s/**` and `scripts/obs_up.sh`. A `paths:` filter is safe HERE and nowhere near the gates. `deploy` is not a required status check — the required set is the twelve rust, frontend and infra contexts — so a filtered run that never reports blocks nothing. On `rust.yml` or `frontend.yml` the same filter would block every PR forever, which is why those use the `detect`-job pattern instead. The header says so, because the two cases look identical and are opposite. `DEPLOY_SHA` falls back to `github.sha`, which on the `push` path IS the pushed commit rather than a moving branch tip — correct here for the same reason it is wrong on the `workflow_run` path. The hazard that comment warns about is reading a branch tip, not the variable. One subtlety: a platform-only commit has no image of its own, so the digest step reuses the newest in ECR. That is already handled, but it emitted a `::warning::` whose whole purpose is catching a build that should have run and did not. Firing it on every platform-only deploy would teach the reader to ignore the annotation and cost exactly that signal, so the expected case is now a `::notice::` and the suspicious one stays a warning. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(skills): regenerate required-checks for the new deploy trigger `required-checks.md` tabulates each job's `if:` condition, so adding the `push` path to deploy-dev is a two-file change by design — the reference cannot drift from what the workflows actually gate on. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This was referenced Nov 6, 2026
Closed
athvin
pushed a commit
that referenced
this pull request
Nov 8, 2026
…es paths #587's push trigger was added to fix a cause that was misdiagnosed — the real reason #507 never deployed was cancel-in-progress, fixed by #599 and this file's queueing. The trigger never fired on a platform-only commit and only raced image builds on mixed commits, leaving noise-red deploy runs on main. Removed with PLATFORM_ONLY and the notice fork; the header now carries the correct diagnosis. deploy is reachable only through images, so images.yml's push paths gain scripts/ci/deploy-*.sh (the hole the removal would open) and deploy_reachability.rs holds all five surfaces in the required test context — both directions observed failing under mutation.
7 tasks done
athvin
pushed a commit
that referenced
this pull request
Nov 8, 2026
…es paths #587's push trigger was added to fix a cause that was misdiagnosed — the real reason #507 never deployed was cancel-in-progress, fixed by #599 and this file's queueing. The trigger never fired on a platform-only commit and only raced image builds on mixed commits, leaving noise-red deploy runs on main. Removed with PLATFORM_ONLY and the notice fork; the header now carries the correct diagnosis. deploy is reachable only through images, so images.yml's push paths gain scripts/ci/deploy-*.sh (the hole the removal would open) and deploy_reachability.rs holds all five surfaces in the required test context — both directions observed failing under mutation.
athvin
added a commit
that referenced
this pull request
Nov 8, 2026
…mages paths (#661) (#899) * wip: claim #661 — remove deploy.yml's misdiagnosed push trigger * fix(ci): remove deploy.yml's misdiagnosed push trigger; gate the images paths #587's push trigger was added to fix a cause that was misdiagnosed — the real reason #507 never deployed was cancel-in-progress, fixed by #599 and this file's queueing. The trigger never fired on a platform-only commit and only raced image builds on mixed commits, leaving noise-red deploy runs on main. Removed with PLATFORM_ONLY and the notice fork; the header now carries the correct diagnosis. deploy is reachable only through images, so images.yml's push paths gain scripts/ci/deploy-*.sh (the hole the removal would open) and deploy_reachability.rs holds all five surfaces in the required test context — both directions observed failing under mutation. * style: cargo fmt * style: clippy map_or * chore(skills): regenerate required-checks for the deploy condition * chore(skills): regenerate post-merge reference for the deploy trigger change --------- Co-authored-by: bmoore813 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
§10.4 is the one prohibition this system has: telemetry carries identifiers
and counts, never attribute values. Three things already upheld it:
sql_spanhas no parameter argument, so there is nowhere to put a bind valueer_span::attrdeclares three namesPii::Neversql_span_pii.rsfails the build if product code names oneAll three are about what the code does. None of them is a boundary.
This adds one: a
transform/pii_allowlistprocessor whosekeep_keysdropsevery span attribute not named. An allowlist, so an attribute nobody
anticipated does not ship merely because nobody thought to forbid it.
Fail-closed by construction — forgetting an attribute loses a field rather
than leaking one, which is the right way round for an engine whose payload is
names and addresses. A denylist has the opposite failure mode.
It sits before
tail_sampling, which reads attributes (theui-interactionspolicy keys oner.action), and both precedebatch, whichwould otherwise hand the sampler trace fragments. A test asserts that ordering
rather than leaving it to whoever next edits the pipeline list.
The list was measured, not derived
The eight are what
tracing-opentelemetryadds on its own:busy_ns,idle_ns,thread.*,code.*,target. Keeping only the 37 would havesilently dropped the CPU-versus-wall-time split, which is among the most
useful things on a stage span — and the symptom would have been a field nobody
could find, with the code right and the deploy green.
That is the cost of a fail-closed allowlist, and it is why the values file says
to look there first when an attribute goes missing.
The gate, and what it caught
collector_allowlist.rsasserts three things:Pii::Nevername is admitted by itIt immediately found
service.nameandservice.version, whichinit.rssets as fields on the process span — distinct from the resource attributes of
the same names. Without the gate the process span would have lost its own
identity while the resource kept it, which is the confusing half of a drop.
It reads both spellings of a span field: a bare
er.foo = …and the{ attr::FOO } = …formsql_spanuses. Missing the second would have made itblind to exactly the attributes that matter most.
Its honest limit is in its own docs: SDK-added attributes appear in no span
macro, so nothing can derive them, and a dependency bump that renames one will
drop it again with no test failing. Re-measure after a bump.
Verification
Gate observed failing (
er.statementremoved from the list) before beingtrusted.
make check→ exit 0.🤖 Generated with Claude Code