Skip to content

feat(audit): a run manifest should answer questions about its own run - #55

Merged
404SecNotFound merged 1 commit into
mainfrom
feat/manifest-completeness
Aug 3, 2026
Merged

feat(audit): a run manifest should answer questions about its own run#55
404SecNotFound merged 1 commit into
mainfrom
feat/manifest-completeness

Conversation

@404SecNotFound

Copy link
Copy Markdown
Owner

Review finding #1. ScenarioManifest recorded vendor and duration;
RunManifest recorded neither, and nothing recorded the rate actually in force or
what the socket really did. A manifest that cannot say which profile rendered it
is a weaker audit record than safety rule 5 implies, and the web layer had to
paper over the gap.

Four fields, all defaulted so manifests written before them still load, which is
the convention pace and speed already set:

  • vendor which dialect rendered these events
  • duration the --duration asked for, verbatim
  • rate the events-per-second ceiling in force
  • send_stats sends, bytes, errors, oversize

send_stats is None rather than a row of zeroes when a run had no collector,
because zeroes read like a send that delivered nothing. event_count counts
events rendered; send_stats["sends"] counts datagrams the kernel accepted, and
the two differing is the interesting case rather than an inconsistency.

Captured on every exit path, so a run that failed part-way still records what its
socket managed before it died.

Read with getattr rather than emitter.stats, because the emitter is an
injection point and several test doubles implement only send/close. Requiring the
attribute would make this record cost every future fake a field it does not
otherwise need. Four existing test doubles proved the point immediately.

875 py. black, ruff, mypy clean.

Review finding #1. ScenarioManifest recorded `vendor` and `duration`;
RunManifest recorded neither, and nothing recorded the rate actually in force or
what the socket really did. A manifest that cannot say which profile rendered it
is a weaker audit record than safety rule 5 implies, and the web layer had to
paper over the gap.

Four fields, all defaulted so manifests written before them still load, which is
the convention `pace` and `speed` already set:

- `vendor`      which dialect rendered these events
- `duration`    the --duration asked for, verbatim
- `rate`        the events-per-second ceiling in force
- `send_stats`  sends, bytes, errors, oversize

`send_stats` is None rather than a row of zeroes when a run had no collector,
because zeroes read like a send that delivered nothing. `event_count` counts
events rendered; `send_stats["sends"]` counts datagrams the kernel accepted, and
the two differing is the interesting case rather than an inconsistency.

Captured on every exit path, so a run that failed part-way still records what its
socket managed before it died.

Read with getattr rather than `emitter.stats`, because the emitter is an
injection point and several test doubles implement only send/close. Requiring the
attribute would make this record cost every future fake a field it does not
otherwise need. Four existing test doubles proved the point immediately.

875 py. black, ruff, mypy clean.
@404SecNotFound
404SecNotFound merged commit 70886cf into main Aug 3, 2026
10 checks passed
@404SecNotFound
404SecNotFound deleted the feat/manifest-completeness branch August 3, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant