Repository navigation
Phase 5c: tracing and metrics — documentation and phase record - #68
Conversation
Review record for the phase 5c stack (#66 → #67 → #68)One independent review by a fresh agent with no memory of the implementer, re-running the gates itself on every tip and both interpreters; it approved on the first pass, so no fix round ran. The stack was cut from
No finding was ever blocking, should-fix, disputed or skipped. Round 0 (final) — open, carried into the PR bodies
What the reviewer verified, in its own runs
Run: workflow |
d60425f to
0a581d5
Compare
032986b to
e0df937
Compare
Phase 5c (issue #20), the tests PR over the code PR. Thirteen suites under gems/dexpace-core/test/dexpace/instrumentation/: six new mirrors (diagnostics, scope, tracing, meter, http_tracer, callable_adapter), four of phase 4a's widened in nested classes (no_span, no_tracer, trace_id_flavour's GenerationTest, bundle's SampledTest) and three with no lib mirror -- ordering_test.rb, OBS-29's own conformance clause driven through a conformant emitter by hand; independence_test.rb, R11's subprocess loading the ten 5c files alone and asserting Event, Logger, Keys and Configuration undefined, written against the file list and not the entry point so it still discriminates once 5b lands; and tracing_matrix_facts_test.rb, the design's floor-straddling facts as a standing test on every row. Two of those facts do not hold on the floor and the suite pins the boundaries rather than the 3.4.10 answer: `Fiber[:k] = nil` deletes from 3.3 and retains a nil-valued key on 3.2, and `Fiber["k"]` interns from 3.4 and raises TypeError on 3.2 and 3.3. support/fiber_storage_facts.rb probes both once per process and gives the scope and tracing suites their floor-aware "removed" assertion -- absent where `= nil` deletes, present-and-nil and never the pushed value on 3.2 (P5-72). support/allocation_delta.rb is the two-loop GC.stat delta OBS-25's zero-allocation assertions share, with the argument discipline that makes it caller-insensitive stated for phase 8a's conformance gem to copy. The four doubles are fakes (testing/7ecef8e8): RecordingSpan, RecordingTracer with its factory minting a fresh tracer per operation (P5-43), RecordingMeter minting a fresh instrument per call so the no-op's sharing is asserted against a fake without it, and RecordingHTTPTracer including the vocabulary and overriding all eleven. They are namespaced Dexpace::Recording* because 5b's plan consumes three of them by those names (P5-73). Every OBS-25 loop passes only frozen constants, Symbols and Integers; every suite touching Fiber[] restores its slots in a teardown the nested classes share; every raise is asserted on the raised object.
Phase 5c (issue #20), the documentation PR over the tests PR. The checklist, written from what was built: twelve own rows, eleven ✅ (OBS-29 ✅ with its unwired half named in the row -- the vocabulary and the ordering test ship, nothing in phase 5 emits it, phase 6a's retry step and phase 8's transports are the emitters; OBS-30 ✅ by construction) and OBS-32 ⏳ under docs/first-release.md's OBS-32/OBS-37 entry, plus thirteen cross-reference rows the way 4b and 4c carried theirs; the matrix facts as measured on 3.2.11, 3.3.12, 3.4.10 and 4.0.6; the twenty-three guards run red with their messages; the audit groups; twenty-one departures from the plan's text, none lowering a gate; the findings routed; the postponed work. The design's ledger gains an "As built" addendum, P5-71 through P5-76: diagnostics.rb created by 5c for 5b to adopt, the floor's residual of the per-key restore, the namespaced doubles, Scope.build public with @api private, CallableAdapter's construction check and nil returns, and NO_TRACER#in_span without a block. Design §8.1 and §10 are frozen; the consolidation and the §8.1 addendum are a human's, as for every phase since 3a, and no frozen sentence is contradicted, so no C15. docs/knowledge/notes/observability.md gains one entry: the two carrier facts the corpus recorded for 3.4.10 alone and 5c found not uniform -- `Fiber[:k] = nil` retains a nil-valued key on 3.2, and `Fiber["k"]` raises TypeError on 3.2 and 3.3 -- with what follows for OBS-23, OBS-24 and ASYNC-9/ASYNC-11. The roadmap gains the thirty-ninth inbound bullet routing that finding to phase 10 for the two later plans written on the 3.4.10 fact, and the phase 5c status note after 4a's: which postponed items landed (phase 4a's span and tracer protocols; SEAM-28's consumer), R15's reading, OBS-29's wiring not shipped and who owns it, diagnostics.rb's three constants shipped early, the tips' gate runs and the guards. docs/sdk-documentation/tracing-and-metrics.md is the as-built page, every fence run verbatim on 4.0.6 and 3.2.11 with the three differences stated where they appear; architecture.md, the core README, README.md and docs/README.md point at it. CLAUDE.md's built-phases sentence, opening paragraph, lib-file count (one hundred and nine under lib/dexpace/), checklist count (nine) and constraints-that-bite list are rewritten from the tree on top of main, for 5c only; the sibling 5a lane edits the same sentences and the merge reconciles them. docs/first-release.md and docs/deviations.md are untouched: the two entries the checklist cites already read true, and phase 10 flips the register.
0a581d5 to
59711ee
Compare
e0df937 to
3401c40
Compare
Closes #20. Sixth PR of the nine-PR phase-5 stack — the documentation and the phase record for phase 5c's two PRs below it. Targets the tests PR's branch. This is the reconciled tip for phases 5a and 5c together: the rebase onto 5a's stack resolved
CLAUDE.md,README.md,docs/README.md,architecture.md, the core README and the roadmap by keeping both lanes' content in 5a-then-5c order with every count re-derived from the combined tree (126 lib files besideversion.rb, nine test-mirror exceptions, ten checklists, ten as-built pages), and appended a short factual tail to 5c's roadmap status note recording the rebase — the 4a precedent. 5c's own checklist, design addendum and as-built page are byte-identical to the reviewed tip3607bfaand describe their own base (730 → 772 manifest rows, nine checklists), as every phase's record does.What lands
10 files, +970 / −25, all Markdown.
docs/work/mvp/phase5/phase5c/2026-09-09-phase5c-tracing-and-metrics-checklist.md, written from the build: 12 own rows — 11 ✅, each naming its task and the test that proves it;OBS-29✅ contract and ordering test only, its unwired half named in the row with its owners (phase 6a Task 9; phase 10's inbound list);OBS-30✅ by construction (norescuein any 5c lib file);OBS-32⏳, post-v1 withdexpace-instrumentation-otel(docs/first-release.md'sOBS-32/OBS-37entry) — plus eleven cross-reference rows carrying fourteen IDs (CTX-14/CTX-15,CTX-20,SEAM-28,XCUT-21,OBS-10/OBS-24,OBS-34,OBS-20,XCUT-11,XCUT-20,NFR-11,ASYNC-9/ASYNC-11) the way 4b and 4c carried theirs. Plus what was built, the guards run red (26, eleven on 3.2.11 too), the matrix facts on all four rows, the audit groups run, the deviations from the plan's text (none lowers a gate), the findings routed, and the postponed work.diagnostics.rbshipped early for 5b to adopt; the Ruby 3.2 floor residual ofOBS-23's removal clause; the four doubles namespaced for 5b's plan;Scope.buildpublic@api private;CallableAdapterrefusing a non-callable;NO_TRACER#in_spanwithout a block. Numbering follows the phase-5 blocks fixed at dispatch (5a's as-built from P5-51, 5b's from P5-91).docs/sdk-design-ruby/§8.1 and §10 are frozen; the consolidation and the addenda (the scope handle's identity test, the per-key restore, the floor residual) are a human's, stated in the roadmap note as 3a–4c did. No frozen sentence is contradicted, so no C15.docs/knowledge/notes/observability.mdgains one entry (append only;sha:manual-phase5c-fiber-nil-and-string-key-floor) narrowingobservability/e0f1e864a third time:Fiber[:k] = nildeletes the key only from Ruby 3.3.0 and retains a nil-valued key on 3.2;Fiber["k"]raisesTypeErroron 3.2 and 3.3 and interns from 3.4. Both facts had been measured on 3.4.10 alone and stated as facts of the range; 5b's union restore (P5-23) and 8b'sASYNC-9/ASYNC-11restore are written on them, which is why the roadmap gains a thirty-ninth inbound bullet for phase 10 alongside 5c's status note.docs/sdk-documentation/tracing-and-metrics.md— new as-built page (twelve fences, every annotation run verbatim on 4.0.6 and 3.2.11 by implementer and reviewer; the two differ only where the page says the floor does);architecture.md, the core README,README.mdanddocs/README.mdupdated to point at it.CLAUDE.md— the built-phases sentence gains 5c, the opening paragraph gains the tracing-and-metrics layer, the lib-file count (103 → 109 underlib/dexpace/), the checklist count (nine), and four lines in "Constraints that will bite" (every no-op method works on a frozen receiver; named keywords never a splat on an SPI;Fiber[]per key and neverFiber#storage=; norescuearound a tracer or meter call).Verification
bundle exec rakeon Ruby 4.0.6 at this tip: exit 0, all seventeen gates green (1,640 / 20,939, 99.97%, YARD 0 undocumented), honest RuboCop 332 files clean.ruby .claude/skills/housekeeping/probe.rb: no drift, all eight checks;verify_knowledge_structure.rbOK (2,166 harvested entries, 53 notes, every cited key live); the housekeeping and knowledge suites green.docs/product-spec/,docs/sdk-design-ruby/,docs/knowledge/harvested/,docs/deviations.md,docs/first-release.md, every earlier phase's documents, the phase-5 charter, and 5a's and 5b's documents.CLAUDE.mdand the status note stated against 5c's own tree (110.rbunderlib/dexpace/, 110.rbsmirrors, the six test-mirror exceptions unchanged), read all twelve own rows against their tests (eleven proven,OBS-23partially — the floor residual, as the row itself says), confirmed the twofirst-release.mdentries and the inbound-list bullet exist where cited, and ran every page fence by hand on both interpreters. The reconciliation agent re-derived the combined counts at this tip, ran the probe (no drift), both verifiers and the full gate set, and ran both as-built pages' fences on 4.0.6.Known follow-ups from the review (not blocking)
claimscheck did not flagCLAUDE.md's stale "one hundred and three" lib-file count against 109 on disk before it was rewritten — the spelled-out count appears not to be one the probe derives. The counts here are true by hand-derivation; the check is process tooling, outside any build phase's scope.