amos 4f17b2afe5 Batch 20 (20261027-C-family-20): map batch 15's ad-hoc families to canonical ones
210 batch-15 tasks used 119 ad-hoc family names. Each now carries one of the
canonical root-cause families (11 of the 19 are used), with version + 1 and a
spec.md note, and was recalibrated through both gates. Claude checked that only
family, version and spec.md changed, that every family is canonical, and the
new trace6 Docker receipts against current digests (210/210 USABLE).
Squashed from the 36-local branch batch20-family.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 05:58:17 +08:00

10 KiB
Raw Permalink Blame History

protocol-retained-topic author specification

Route C original, source hwe/gi-ros2-qos-durability-volatile, family topic-protocol, C++17, version 1. Status CALIBRATED; difficulty UNMEASURED. No real Agent, Qwen, Pi, ROS runtime or hardware execution has occurred.

The material's reference is Python despite a .c suffix. Its one-message durability example supplies the knowledge point only. The full broker, bounded delivery queues, configuration parser, two defects, public observer and independent Python oracle are original. Source scripts were read as text and SHA-bound, never executed. This is not a reproduced real incident. The offered/requested policies, late subscription and writer-local history still exhibit the same reliability issue after replacing the hardware and ROS/DDS runtime. These simplified public rules do not claim DDS standards completeness, distributed discovery, reliability transport, persistence across processes, timing or ARM performance.

Public basis for every acceptance behavior

All references below are to template/docs/service.md (frozen identical public document in the Agent workspace), not an undisclosed standard. Numeric fields and struct order are also in template/topic.hpp:12, :16, :24, :32, :40, :46.

acceptance behavior exact public basis
compile and execute C++17 with frozen observer, only candidate sources service.md:42 C16; topic.hpp:54 interface
writer/reader independent id spaces, topic/policy/depth/capacity limits, creation validation before duplicate, immutable failures service.md:4 C02; service.md:41 C15 sentinels
successful generation, per-generation sequence, global order, int32 payload, no failed counter increments service.md:5 C03
retained/volatile distinction, independent bounded writer history, irreversible shrink and expansion service.md:6 C04
live offered/requested durability compatibility and topic filtering service.md:7 C05
late-join cache merge in publication order with historical flag, bounded replay overflow service.md:8 C06
reader isolation, oldest-first take/peek, maximum zero, drop/delivered accounting, output preservation service.md:9 C07; service.md:41 C15
reader resize/drop accounting, no expansion replay, reset counters on recreation service.md:10 C08
writer close destroys history, queued values survive, generation reuse, fresh reader reconnect and missing handling service.md:11 C09
topic/global summaries and writer/reader views, counter reset, two brokers do not share state service.md:12 C10
sensor/map/control/status profiles, strict open_profile names, unknown profile validation precedence service.md:13 C11
policy text trim domain, exact grammar and ASCII numeric depth, leading plus/zeros, no length cap, immutable failures and canonical formatter service.md:14 C12
valid LF input, SP/TAB/CR separators and signed int32 numbers, hex inputs, valid stream exit zero service.md:15 C13; service.md:41 C15
stdout exact row count/order and numeric values, equivalent decimal signs/leading zeros and horizontal space, defined fields only service.md:16 C14; service.md:22-39 command table; service.md:41 C15
arbitrary stderr bytes are allowed independently of stdout service.md:15 C13 and service.md:16 C14

The private test does not enforce invalid observer-stream exit behavior; all supplied streams are public-valid. It compares only defined success fields and returned vector members, never unused tails. stdout parser checks each entire ASCII decimal token and strips sign/leading zeros before bounded conversion, so 5000 zero digits cannot hit Python's decimal conversion limit. The observer has no hidden assertion or expected result and prints raw returns, fields and vectors. It has no private nonce mechanism. The fixed-seed Python model computes expected values from public commands and an independent journal/eligibility-set state model; no gold process is called to get expectations.

Independent defects

  1. policy.cpp map profile offers volatile instead of retained. Startup map publication before subscription is lost, including the default make demo. Public basis C11/C04/C06. only_fix_map repairs this while retaining defect 2, so it still fails.
  2. broker.cpp writer close deactivates the writer without destroying replayable history. Subsequent same-topic retained subscriptions receive data from the closed writer. This requires the alternative public lifecycle scenario, beyond the map startup demo. Public basis C09/C06. only_fix_close repairs lifetime while retaining defect 1, so it still fails.

Fixtures and acceptance

  • gold: incremental per-writer deque histories and reader deques, all behavior PASS.
  • valid_journal: a single publication journal, active writer generation records and irreversible sequence watermarks, with vector reader inboxes; replay scans the global journal instead of collecting and sorting per-writer queues. This is an independent data organization/algorithm, PASS.
  • template: both defects, FAIL.
  • noop: validly links the entire API, exits zero when the first broker is created, emits no service rows, FAIL.
  • cheat: validly links, prints only the four-row public map transcript and exits zero, FAIL on remaining runtime input.
  • cheat_read_grader: gold behavior only if the protected grader can be read from /grader or a process cwd; exits 71 otherwise. Docker must FAIL; Linux trusted local may PASS because it is not an isolation environment.
  • only_fix_map / only_fix_close: one true repair each, the independent remaining defect yields actual observation mismatch, FAIL.
  • mask_symptom: map retained depth 1 makes startup look right but loses publicly permitted longer history, and keeps stale-close history; FAIL.

All nine fixtures consist only of topic.hpp, broker.cpp, policy.cpp, except template which also contains the complete public engineering workbench. They all build; all negatives are rejected by actual execution behavior, not build failures. The formal oracle has 1441 command/observation rows: profile and lifecycle repros, all durability compatibility pairs, independent cache depths, merged writer histories, queue overflow/resize, close/recreate, negative bounds, immutable failures, seeded mixed operations, all 16 topics and two brokers.

Engineering size

Count each unique template source/header/public observer/necessary Makefile once; omit blank/comment lines. Conservatively also remove standalone {, }, }; lines. No fixture multiplicity or private grader code is counted. There are 699 ordinary nonempty noncomment lines, 543 conservative lines (392 candidate + 151 public support), and 522 conservative lines after additionally excluding preprocessor directives. The per-file data is stored in code-lines.json. Support parses the public command/hex/numeric protocol, emits raw observations and builds the complete service; it is necessary engineering, not repeated samples or pure data.

Execution and evidence boundaries

verify.py is byte-identical to rollout/bos_verify.py; grader files are only check.py and context.json. Sources and public support are prepared before the first child. The parent never traverses or reads/writes the candidate-controlled scratch thereafter. Compiler, candidate, cleanup and independent strict-lstat absence execute through a candidate-identity subreaper supervisor, with deadlines 20/8/5/5 seconds and at most 3 seconds recovery. It repeatedly discovers the real ancestry closure and still-live same-start historical roots; zombie/exited/reused tokens cannot authorize ancestry or signals. Each signal freshly reads the PID/start before kill. Popen leader poll/wait precedes individual adopted-child waits; same-PG and setsid descendants are recovered. Discovery/signal/wait/drain faults remain recorded while recovery retries. Cleanup is in finally and separate absence checks only accept FileNotFoundError; nonzero/timeout/unknown metadata/any exception rejects PASS.

Metadata has actual supervisor identity, supervisor/leader PID/start, real leader rc/reaped, controlled return, timeout, elapsed/deadline, owned closure absence, signals, adopted waits, exception lists, original IO lengths/SHA and wrapper raw wire length/SHA. Parent validates exact numeric/boolean types, identities, bindings, finite time range and return consistency. pg_absent is derived from the owned closure, not a separate scan of every process group. Supervisor identity is measured; post-exec leader credentials are not independently probed. Supplying stdin is not proof of input consumption. No complete real Agent trace is claimed.

The final 4000-character Bos stderr budget is respected using a compressed RT_EVIDENCE record. Small actual IO uses lossless zlib85; actual periodic IO (including 17 MiB all256 stderr) can use a verified exact periodic codec. General large IO and the raw wrapper wire retain actual length/SHA only, explicitly summary-only; those are not claimed as saved original bytes. Diagnostic actual packages are complete loadable copies with actual check/context/candidate/raw-log SHA bindings. The one malformed EACCES injection is retained as an excluded construction syntax failure; a corrected fixed-image lstat probe is separately required. Historical attempts are never overwritten.

The author runs only this task's behavior tests and two five-per-class calibration gates. Root owns all-repository tests and independent review. Formal task state may become CALIBRATED after both gates; ADMITTED and measured model difficulty require later real sampling.

Final author handoff

Both formal gates were executed once at digest c750899d41a5d597d48b82029153f743195ed8f93e14f5d3f403a3bb6a8525b8, nine fixtures five times each. Docker PASS (45/45), local raw FAIL solely because the five cheat_read_grader trials PASS without isolation, the explicit BRIEF exception. All gold/valid trials PASS; every other Docker trial FAIL; all outer cleanup confirmed. Final evidence contains 360 inner phases, 355 real leader rc0 and five Docker reader rc71, no timeouts in the formal gates. Actual diagnostics and public-probe receipts are in the authorized author directory report.json. No successful gate was repeated. Root independent review, global suite and any real Agent sampling remain outside this author's scope.

族名规范化:topic-protocol → resource-lifecycle(2026-10-27)