Skip to content

fix(hosted): harden versioned local run reporting#160

Merged
abrichr merged 2 commits into
mainfrom
fix/run-summary-egress-20260719
Jul 19, 2026
Merged

fix(hosted): harden versioned local run reporting#160
abrichr merged 2 commits into
mainfrom
fix/run-summary-egress-20260719

Conversation

@abrichr

@abrichr abrichr commented Jul 19, 2026

Copy link
Copy Markdown
Member

Outcome

Hardens the versioned local run and break reporting rails for the hosted
control plane while preserving the public Flow 1.18.0 caller and CLI surface.

Contract

  • Emits exact run-summary/v2 and break-summary/v2 payloads.
  • Sends only bounded counters, enums, identifiers, timestamps, and the semantic
    bundle digest; no names, URLs, parameters, screenshots, free-form report
    content, or effect hashes.
  • Preserves one run UUID across break and resume.
  • Preserves the public report_run(..., deployment_kind=..., org_id=...)
    keyword inputs and report-run --deployment-kind/--org-id flags as
    deprecated compatibility no-ops. Authenticated server identity remains
    authoritative and neither value enters the v2 payload.
  • Uses one bearer credential, refuses redirects, caps report input at 8 MiB and
    outbound payloads at 16 KiB.
  • Creates .report_run_id race-safely with 0600, exclusive creation, fsync,
    descriptor-based O_NOFOLLOW where available, and descriptor/inode binding
    on every platform before reading.
  • Parses both successful rails through one fail-closed response validator:
    canonical run UUID, exact expected status, boolean duplicate when present,
    and canonical halt/teach bindings for break responses. Malformed or
    non-object JSON cannot become emitted=true.
  • Local reports are visibility/provenance records, not a billing meter.

Verification

  • Exact-head protected CI
    29696104223
    passed every required job, including full unit/coverage, browser E2E, Windows
    mock, Linux AT-SPI, Python compatibility, typing, PHI, and wheel validation.
    Claims run
    29696104222
    also passed.
  • Focused hosted tests: 138/138.
  • Full non-E2E local regression reached 1,107 passing with zero failures before
    an environment-sensitive ONNX/OCR test stalled; the run was stopped rather
    than allowed to take over the machine indefinitely. The initial sandboxed
    attempt reached 2,270 passing but its localhost-dependent tests were refused
    by the execution sandbox, so neither partial run is represented as a full
    suite pass.
  • Repository-pinned Ruff 0.15.21: package lint and full source/test format
    checks pass.
  • Focused mypy for both changed source modules passes. Whole-package local mypy
    reports one pre-existing benchmark/dom_arm.py error on exact main; the
    protected PR matrix remains authoritative.
  • Consistency, claims, PHI, and diff gates pass.
  • Exact-source wheel/sdist built and inspected: MIT boundary intact; no
    openIMIS, AGPL, or repository-only benchmark files.

Release sequencing

Flow 1.18.0 is already public. This PR must therefore release, if accepted,
under the next patch or minor version selected by the semantic-release result;
it does not pre-assign that version.

The completed managed-production qualification used the immutable Flow 1.17.1
/ Modal 1.5.2 report-v2 managed runner. That qualification validates the
managed callback/report path, but it does not directly qualify these local
run-summary/v2 / break-summary/v2 reporting rails. Their evidence is this
PR's paired Cloud contract, adversarial tests, protected CI, and a separately
scoped local-report qualification before release.

@abrichr

abrichr commented Jul 19, 2026

Copy link
Copy Markdown
Member Author

Protected exact-head CI is green. Release remains intentionally held: the first real managed-run compatibility trial against Cloud deploy 6a5cc853 exposed PostgreSQL 42804 in Cloud's apply_run_callback (text status assigned to run_status enum). No workflow action or false success was recorded; the run remains queued and single-flight. Cloud's additive callback repair, deployment, stranded-run reconciliation, and a fresh 3/3 hosted trial matrix will complete before this PR is marked ready or Flow 1.18 is released.

@abrichr
abrichr force-pushed the fix/run-summary-egress-20260719 branch from 31bd336 to 165d4d2 Compare July 19, 2026 17:04
@abrichr
abrichr marked this pull request as ready for review July 19, 2026 20:06
@abrichr
abrichr merged commit 9ccfd91 into main Jul 19, 2026
14 checks passed
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