Skip to content

refactor(reporting): run every report publish through one shared owner - #182

Merged
lanyue-llk merged 12 commits into
mainfrom
refactor/shared-report-publish
Nov 3, 2026
Merged

lanyue-llk merged 12 commits into
mainfrom
refactor/shared-report-publish

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What, why and how of this PR

Issues

Closes #178

Summary

src/harness/reporting/publish.py now owns publish orchestration. Every track is an adapter that names its own target, version, client and journals. The owner has no default site. CLI flags and profile fields are unchanged, and nothing was published.

Lifecycle Tracks What it proves
publish_receipt_release Web Fetch, Web Search, public WebArena replay Submits and records a private receipt; byte verification stays a separate command
publish_bound_release Browser Use, Browser Trajectory Replay Verifies exported bytes and the public share, then advances profile and attestation together
publish_staged_update WCXB Resumes one staged update from a per-release journal, verifies it, then the report binds its flat profile

I kept three lifecycles rather than one because they differ in what they prove and where they store state. Forcing them together would change persisted journal and receipt formats, which an interrupted release must still be able to resume from.

  • The two near-identical _publish copies in Browser Use and replay are merged. Their differences are now explicit BoundTrack fields.
  • Web Search and public WebArena no longer import from web_fetch/report_publish.py.
  • upload_large_archive, put_file and updated_receipt moved from web_fetch/publication.py to the owner.
  • publication_target.py moved to harness/reporting/. Superseded helpers are removed with no aliases.
  • Token rules are unchanged. artifact_auth.py and web_fetch/safety.py stay where they are, as reporting/publication.py already imported them.

Behavior changes

No rendered output changed. These request-level changes came from the merge, so please check them:

  • Browser Use request order: it now creates a missing share before the version lookup and title update, and looks the version up after an upload instead of trusting the response. This matches replay, whose order for an upload of the same size is unchanged.
  • Replay receipt check: a replay receipt naming another site now stops the run before any request. Browser Use already did this.
  • Share URL on a bound release: both tracks now use the profile's share URL, then the receipt's, and create a share only if neither exists. Browser Use previously used the receipt's and ignored the profile's, so a profile and receipt that disagree now resolve the other way. Replay previously read only the profile and failed when it had no share URL.
  • Share URL on a resumed create: replay now reuses a share URL saved in its receipt instead of creating another. Browser Use already did this.
  • Pending create receipt with no verified field: Browser Use previously started a new create. It now treats the receipt as pending, as replay already did: a matching receipt resumes without a second create, and a receipt for another base URL or package raises before any request. A receipt with verified: true is still not pending.
  • Replay receipts: they now keep the service response fields, as Browser Use receipts do. The version stays under one key per track (version for replay, versionId for Browser Use). Other version keys (version, versionId, version_id, currentVersionId) and phase are dropped when a release settles, and tokens are still stripped.
  • Replay staged create: a new site from an archive over 23 MB now needs --create, as a smaller archive already did. Previously the staged path ignored the flag and created the site. It now stops before any request with the same error.
  • Web Search and public WebArena identity: they previously sent the Web Fetch user agent and now send their own (Web-Search-Report-Publisher/1.0, Public-WebArena-Report-Publisher/1.0). Their multipart upload bytes stay identical, including the webfetch boundary and filename, so an interrupted operation still replays the same body under its idempotency key.
  • Upload title: upload_large_archive no longer defaults to the Web Fetch title. Creating a site without a title now fails before any request.

Test plan

  • Lint gate: ruff check --config 'include=["*.py"]' --select F,TID252 . and ruff check both pass.
  • Publish, recovery, upload, binding, token, WCXB, Web Search, Browser Use, replay and golden route tests, 15 files: 329 passed. tests/test_golden_reports.py passes with no snapshot changes.
  • New wire-level flows run each track's real entry point with only urlopen faked: Web Search publish and public WebArena publish_current identity and multipart bytes; Browser Use and replay create and update receipts holding no service token in the pending, binding or final state; one version key taken from the post-upload lookup; share URL precedence and share creation for a bound profile; resuming a create after an interrupted binding; matching and mismatching receipts with no verified field; a verified receipt not counting as pending; own and foreign operation journals; a moved remote version accepted only when the export proves the same bytes; and the upload title guard.
  • Mutation check of those tests: 22 local source mutations of the adapters and publish.py (upload name, client, namespace, raw receipt writes, the share URL, settled fields, the title guard, the verified check, export check, version source, journal check), run one at a time against tests/test_reporting_publish_client.py and tests/test_reporting_upload.py. All 22 fail the tests. The mutations were not committed.
  • Round 2: all 30 test files that reference the publish modules, plus golden routes: 829 passed, 3 failed. The 3 are in tests/test_optional_reports.py (Dataset revision is not recorded in data-lock.json) and fail the same way on base f877f6a. No golden snapshot changed.
  • Round 2 mutation check: 15 local source mutations, run one at a time against tests/test_reporting_publish_client.py, tests/test_wcxb_publication.py and tests/test_webfetch_report_publish.py. They covered the staged create gate, the data attachment target checks, the journal identity fields, the settled keys and the four failure gates. All 15 fail the tests. The mutations were not committed.
  • Full local suite, on an earlier head, before the later test-only commits: 19547 passed, 60 skipped, 79 failed. That run set the import path through pytest's pythonpath option rather than the PYTHONPATH environment variable, so subprocess tests imported the shared environment's installed checkout instead of this branch. I did not triage the 79 failures individually, so CI is the gate for them.
  • CI: pending on this head when this text was written; see the checks on this PR.
  • Nothing was published and no real Artifact Site was called; all tests use synthetic transports or a faked urlopen.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · c2a92ca

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/reporting/publish.py Outdated
Comment on lines +241 to +242
boundary_prefix="----" + namespace,
filename=namespace + ".zip",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · high
P1: Preserve multipart bytes when resuming pre-refactor receipt operations. Web Search and public WebArena previously used ----webfetch and webfetch.zip, but their journal identities and keys are unchanged here. An existing journal therefore passes operations.pending(), and when operation recovery returns retryable, this code resends a different body under the original Idempotency-Key. That breaks the interrupted-upload compatibility contract and can leave the release unable to complete due to an idempotency payload conflict. The PR warning to finish uploads first does not protect existing journals at runtime. Preserve the legacy multipart encoding for those pending operations (with an explicit encoding marker for new operations), and cover resuming a pre-refactor journal against a retryable operation; do not simply allocate a fresh key for an uncertain upload.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · c9fa416

No findings in this incremental review.

@lanyue-llk lanyue-llk left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review, round 1

Reviewed head c9fa4161 against main f877f6a6. No correctness bug or rule violation found. Four test and PR-text findings below, none blocking on behaviour.

Findings

P2. tests/test_reporting_publish_client.py:370: the Web Search and public WebArena identity test bypasses both adapters.
test_receipt_tracks_send_their_own_identity_and_keep_replayable_upload_bytes builds its own ReceiptRelease from owner.CLIENT and owner.UPLOAD_NAME, so web_search.publish and public_webarena.publish_current never run. The PR lists this as coverage of those tracks sending their own identity with byte-identical uploads.
I checked with two mutations. Changing the wiring at src/harness/web_search/publication.py:163 and src/harness/trajectory_replay/public_webarena/publication.py:452 to upload_name="search" / "public-webarena" and a WebFetch-Report-Publisher client passes all 12 publish test files. That wiring is what keeps an interrupted operation replayable.
Fix: drive the real publish and publish_current entry points behind the wire fixture with no transport, then assert the user agent and body.

P2. src/harness/reporting/publish.py:632: no test covers token stripping on the bound lifecycle any more, while replay now stores raw service responses.
The PR deletes test_track_receipts_use_the_shared_writer. Replay previously wrote fixed fields only; it now persists the creation response at this line and keeps response fields in settled. The code is correct today because every write uses write_receipt.
Replacing this write_receipt with atomic_write(track.receipt, json_bytes(result)) passes the same 12 files, so a service-returned editToken could reach the pending receipt unnoticed. test_receipt_is_private_and_drops_service_credentials_at_every_depth only exercises the writer directly.
Fix: parametrize a Browser Use and replay create flow whose response carries editToken and claimToken, and assert neither reaches the receipt in the pending or final state.

P2. src/harness/reporting/publish.py:502, :633, :667-668, :119: most behaviour changes listed in the PR have no test.
Each of these mutations passes the 12 publish test files:

  • A resumed create never reuses the share URL in its receipt (share_url = "" at :633). The PR says it reuses it.
  • settled = {} at :667, which drops the replay and Browser Use response fields the PR says are kept.
  • if key not in {"phase"} at :668, which keeps stale version / versionId keys, so "one key per track" is not enforced.
  • Removing the title guard at :118-119. The PR says creating a site without a title now fails.
  • pending_created_site returning "" whenever verified is not False (:502), which restores the old Browser Use behaviour the PR says changed.

The bound replay profile with no share URL also has no test; the code reads correctly.
Fix: add one synthetic flow per item. These are recovery paths that run after an interrupted release, so they are unlikely to get exercised otherwise.

P3. PR body, "Behavior changes": the verified entry is imprecise and one change is missing.

  • The body says a pending create whose receipt has no verified field "now raises". It raises only when base URL, archive or slug differ. A matching receipt resumes the create (pending_created_site returned the slug when I called it directly). Resuming looks safe because verify_export still proves the bytes, but the text should say so.
  • Not listed: src/harness/reporting/publish.py:617 makes Browser Use prefer the profile's share_url over the receipt's. Before, it used the receipt's and created a new share if the receipt had none. If the two disagree, it now verifies and re-binds the profile's URL. The mutation that ignores the profile's URL also passes all tests.

Fix: correct the text, and add a test for the precedence.

Verified, no defect

  • Moved helpers: an AST comparison against web_fetch/publication.py shows updated_receipt and put_file are identical. upload_large_archive differs only by its title default and the new guard.
  • Receipt lifecycle: read line by line against the old publish. It differs only in renames and the removal of a redundant check. validate_release stays Web Fetch only, in the adapter. Journal schemas and key prefixes are unchanged.
  • Bound lifecycle: identity fields, staged idempotency keys, version fields, preview checks and binding match both old copies, apart from the changes listed in the PR. Public requests stay unauthenticated.
  • WCXB: the staged update is a parameterized move. Binding still happens inside the snapshot.
  • Targets and tokens: the owner has no default site. publication_target.py is a pure rename, and credential loading is untouched.
  • Repository inventory: no references remain to removed paths or helpers, including in evaluation/, research/ and configs/. Each affected module imports on its own in a fresh interpreter, so no import cycle.
  • Scope: Closes #178 holds. No other module runs a publish; rename_main and publication_verify are not publish orchestration.

Test and CI results

  • Lint gate: passes.
  • Local tests with PYTHONPATH on this checkout: 235 passed (publish and golden targets), 433 passed (15 further files that touch publication). tests/test_golden_reports.py passes with no snapshot changes.
  • CI on c9fa4161: Tests and static checks, Installation and packaging, Rendered reference and report checks all succeed. The PR is mergeable and main has not moved.
  • I did not run the full local suite, and nothing was published.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Round 1 review findings. All four are addressed with no change to src/, and none are disputed. New head: c39aa25.

P2, Web Search and public WebArena identity test (0c563e5). The test now runs the real web_search.publish and public_webarena.publish_current behind the wire fixture with no transport. It asserts the user agent, idempotency namespace, content type and full multipart body. Changing the upload name, client or namespace in either adapter now fails it.

P2, tokens in receipts (5bbe47e, extended in 28eb032). A parametrized Browser Use and replay create flow has a service response carrying editToken and claimToken, including nested. It reads the receipt in the pending, binding and final states and asserts no token reaches any of them, while other response fields are kept. Replacing write_receipt with atomic_write at any of the three writes fails it. The bound update flow in 28eb032 makes the same check on its final receipt.

P2, untested behaviour changes (28eb032). Added one synthetic flow per listed behaviour, for both bound tracks:

  • A resumed create reuses the receipt's share URL, tested with a receipt left by an interrupted binding.
  • Settled receipts keep response fields and drop stale version keys and phase.
  • The version comes from the post-upload lookup, not the upload response.
  • The title guard stops an upload before any request.
  • A receipt with no verified field resumes on a match and raises on a mismatch; a verified receipt is not pending.
  • A bound profile with no share URL creates a share, including replay with no receipt at all.
  • A resumed create accepts its own operation journal and rejects another release's.
  • A moved remote version is accepted only when the first export proves the same bytes.

P3, PR text and share URL precedence (c39aa25). The Behavior changes section is corrected:

  • The verified entry now says a matching receipt resumes and only a mismatch raises, and that this changed only Browser Use.
  • The share URL precedence change is now listed.
  • Replay's bound and resumed-create share URL changes are now separate entries.

c39aa25 tests the order of profile, then receipt, then create.

How this was checked. I ran 22 source mutations one at a time, covering each mutation named in the findings. All 22 fail the new tests. no-export-check survived the first pass because the later export check caught the same bad bytes, so the test now also asserts the run stops at the first export. The mutations were not committed.

Local results: lint passes, and 329 tests pass across the 15 publish and golden test files with no snapshot changes. Nothing was published and no real Artifact Site was called.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Review skipped · c39aa25

No reviewable content was selected for this run.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review, round 2

Reviewed head c39aa25e. CI passes on this head: Tests and static checks, Installation and packaging, and Rendered reference and report checks. The four round 1 findings are resolved. This round found three P2 and two P3 items. None of them changes rendered output or touches evidence.

Findings

P2: src/harness/reporting/publish.py:576-581: replay creates a new site without --create when the archive is large.

  • Problem: upload() takes allow_create but returns from the staged branch before using it. A single-request create without --create stops with "no bound site or matching pending creation operation". An archive over 23 MB skips that check. I ran replay.main(create=False) on an unbound profile with the threshold set to 0, behind a faked urlopen. It sent POST /api/uploads, POST /api/uploads/stage_one/commit and POST /api/sites/site-new/shares.
  • Origin: the base code has the same gap in its large-archive branch, so this is not a regression. The merged helper now makes the ignored parameter look enforced.
  • Fix: in the staged branch, raise when slug is None and not allow_create, and add a test next to test_browser_use_requires_its_receipt_and_replay_stages_large_archives. If this should stay out of this PR, open a follow-up issue and link it.

P2: src/harness/web_fetch/report_publish.py:53 and src/harness/reporting/publish.py:264: the data attachment target check has no test.

  • Problem: this PR moved the check that attachments match the publication authority and its service into an optional check_target callback. The code is correct, but removing the call at publish.py:264-265 passes all 22 publish-related test files. No test in the repository mentions parts_manifest or this error, at base or at head. Issue #178 requires each report to keep its own target.
  • Fix: add one Web Fetch publish test with a parts_manifest, covering mismatched data_publications and a mismatched base_url. Both should fail before any request.

P2: src/harness/reporting/publish.py:563-566: nothing pins the journal identity of a bound update.

  • Problem: the PR's reason for keeping three lifecycles is that an interrupted release must still resume from its persisted journal. Removing slug and expected_version from the identity passes all 22 files, even though it changes kind to create. It also lets a journal written for one expected version match another. The current code matches the old field values, but only the schema string is protected.
  • Fix: assert the exact journal written by a Browser Use and a replay update, as a literal dict. Then resume from a literal journal in the pre-PR format and check that it replays its key.

P3: src/harness/reporting/publish.py:667-668: settled can keep a second version key.

  • Problem: it drops version and versionId, but the old Browser Use code also read version_id and currentVersionId. If a response carries either one, it stays in the receipt and is carried into later receipts, where it can go stale. The PR says the version stays under one key per track. No current code reads these keys, so the harm is a misleading receipt.
  • Fix: drop those two keys as well, and extend test_bound_update_settles_one_version_key_from_the_lookup_and_keeps_response_fields.

P3: src/harness/reporting/publish.py:640, 647, 654, 713: four failure gates have no negative test.

  • Problem: each of these can be removed with all 22 files still passing: the https:// check on a created share URL, the title PATCH failure check, the public share non-200 check, and the WCXB check that the expected version matches its pending operation.
  • Fix: add one failing-response case for each.

What I verified

  • Compared the Browser Use, replay, Web Fetch, Web Search, public WebArena and WCXB flows against base f877f6a6. The PR's Behavior changes list matches the code. I found only trivial unlisted differences, such as error types and messages, and Web Fetch validating the release before rejecting an unknown mode.
  • Idempotency keys, staged key seeds, multipart names, client identities and timeouts are preserved, apart from the listed user agent change. put_file and upload_large_archive moved unchanged apart from the listed title guard.
  • Each adapter still names its own target and client, and the owner holds no default site. Token handling in artifact_auth.py is unchanged apart from an import path.
  • No references to removed modules or helpers remain in src, scripts, tests, docs or .agents. Each changed publisher module imports cleanly in a fresh interpreter.
  • Lint gate passes. 265 tests passed across the publish, recovery, upload, token, WCXB, Web Search, Browser Use, replay and golden test files, with no snapshot changes. A wider set of 22 publish-related files passed 620.
  • New tests use only reserved example hosts, and I found no local paths or credentials in the diff.

Mutation check

I ran 38 of my own local mutations, none committed: 22 were killed and 16 survived. Six of the survivors were rerun against the 22-file set and still survived; those are the ones cited above. The other survivors ran only against a narrower 12-file set and are not reported. Several are redundant with a later check, such as release.check() or the final export, or are outside this PR's changes.

Nothing was published and no real Artifact Site was called.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Round 2 review findings. All five are fixed and none are disputed. New head: d57ad18.

P2, staged create ignored allow_create (261db19). A new site from an archive over the staged threshold now needs --create. Without it, the run stops before any request with the same error as the multipart path. The test runs Browser Use and replay on an unbound profile with the threshold at 0. This changes replay behaviour from base, so it is now listed under Behavior changes in the PR text.

P2, data attachment target check (d57ad18). A Web Fetch publish test now uses a real parts_manifest. A version, site or missing binding that differs from the profile, or a base_url on another service, each fails before any request and leaves the receipt and journal untouched. A matching plan still publishes, as a positive control.

P2, journal identity of a bound update (c62ffdc).

  • The journal on disk at upload time is asserted as a full dict for update and create on both tracks. The archive hash and generated key are computed; the other fields are literals, checked by reading the base code.
  • A saved journal written from those literals replays its key when the service has no result, and recovers without another upload when the operation completed.
  • A saved journal with another expected version, slug or kind stops before any upload.
  • Replay's staged idempotency keys are pinned against the same literal identity.

P3, stale version keys (641bd62). settled now also drops version_id and currentVersionId. The test puts both in the saved receipt and in the upload response.

P3, failure gates (ff8b9c0).

  • A created share URL that is plain http or missing stops before the share is used.
  • A failed title PATCH stops Browser Use before the export.
  • A public share that is not 200 stops before the preview: 202 on both tracks and 404 on replay. Browser Use's public client raises on 4xx itself, so only a non-200 2xx reaches this gate on that track.
  • A WCXB profile version that differs from its pending operation stops before any request.

Each failure case also asserts the release stays unbound.

How this was checked. I ran 15 source mutations one at a time, covering each gate above and each identity field. All 15 fail the new tests, and the mutations were not committed.

Local results: lint passes. Across the 30 test files that reference the publish modules, plus golden routes: 829 passed, 3 failed, with no snapshot changes. The 3 failures are in tests/test_optional_reports.py (Dataset revision is not recorded in data-lock.json) and fail the same way on base f877f6a. Nothing was published and no real Artifact Site was called. CI on the new head is pending as I write this.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · d57ad18

No findings in this incremental review.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review, round 3

Reviewed head d57ad188 against base f877f6a6. Main has not moved and the PR is mergeable.

Findings

P3, src/harness/web_fetch/report_publish.py:42: dead validation_inputs parameter.

  • Problem: Web Search and public WebArena were the only reasons publish() took validation_inputs. Both now call publish_receipt_release directly, so no code in src, scripts or tests passes it. The parameter stays only as a default that lines 46 and 51 extend. AGENTS.md asks for superseded code to be removed in the same change.
  • Fix: remove the parameter and start from a local validation_inputs = (). package_check can stay, since the tests use it to replace the package check.

No other defects found.

What I verified

  • CI on this head: Tests and static checks, Installation and packaging, Rendered reference and report checks, and Python 3.11 all pass.
  • Local checks: both lint gates pass. All 27 test files that reference the publish modules pass (836 tests), including tests/test_golden_reports.py, with no snapshot changes.
  • Old and new code: I compared the old Browser Use and replay _publish, Web Fetch publish and WCXB publish with the new lifecycles, line by line. Every difference I found in requests, receipts and journals is listed under the PR's Behavior changes. Journal identity, idempotency keys, multipart boundary and filename are unchanged for each track, and resuming from a receipt or journal written before this PR still works by code reading.
  • Round 2 fixes: the staged create gate, the data attachment target check, the journal identity, the settled version keys and the four failure gates are all present in the code. I re-ran mutations only for the attachment target check and the journal identity, and both fail the tests. I did not repeat the author's mutations for the others.
  • Scope of Closes #178: every publisher using PublicationClient for orchestration goes through reporting/publish.py, and web_fetch/publication_verify.py only verifies. Each adapter names its own target and the owner holds no default site. Token handling stays behind PublicationClient, and no references to the removed helpers or the old publication_target path remain.
  • Imports: each moved or changed module imports on its own in a fresh interpreter, so there is no import cycle between artifact_auth and reporting.
  • Repository rules: no aliases, evidence or profiles changed. Added test URLs use only .example and .invalid hosts, and I found no private paths in the diff.

Existing test gaps (not findings)

I ran 63 further source mutations against those 27 test files. 26 survive on this head, for example:

  • the frozen release check before each bound request
  • the final validate_package
  • the incomplete binding check
  • the replay preview marker
  • the WCXB profile guard
  • the adapter inputs for replay, Web Search and public WebArena

I applied the equivalent mutations to base f877f6a6, and they survive there too, so this PR did not cause the gaps. The test files were not the full suite. These could be a separate follow-up, but they do not need to block this PR.

Nothing was published and no real Artifact Site was called.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review round 3: fixed the P3 finding in 22016d1. publish() in src/harness/web_fetch/report_publish.py no longer takes validation_inputs; it now builds them locally from the presentation binding and parts manifest. package_check stays because the tests use it. Nothing was disputed. Existing publish tests cover the behavior, so no new test was added; publish-related tests and the golden report snapshots pass locally (392 passed), and rendered output is unchanged.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · 22016d1

No findings in this incremental review.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review, round 4

Reviewed head 22016d14 against base f877f6a6. Main has not moved. No defects found.

What I verified

  • CI: Tests and static checks, Installation and packaging, Rendered reference and report checks, and Python 3.11 all pass on this head.
  • Local run: both lint gates pass. All 30 test files that reference the publish modules, plus tests/test_golden_reports.py, gave 849 passed. No golden snapshot changed.
  • Round 3 fix: 22016d14 touches only web_fetch/report_publish.py. No caller passes validation_inputs any more, and publish() builds the same inputs in the same order as base.
  • Receipt lifecycle: I compared it line by line with base publish.
    • The Web Fetch release validation still runs, and only for Web Fetch.
    • Web Search and public WebArena keep their namespaces, ----webfetch boundary, webfetch.zip filename and boundary seed, so a pending operation replays the same bytes.
    • Their new clients have the same timeouts and error behaviour as the Web Fetch client; only the user agent differs.
  • Bound lifecycle: I compared it with both base _publish functions.
    • Replay's operation identity, staged keys, request order and public checks match base.
    • Browser Use differs only in the ways the PR lists, and I found no unlisted request-level change.
    • The interrupted paths still recover: a crash after upload, before binding, and after binding but before the final receipt.
  • WCXB: the journal name, idempotency keys, frozen inputs and failure checks match base.
  • Targets and tokens: the shared owner holds no default site or title. Token loading stays behind PublicationClient, and public share requests stay unauthenticated in both bound tracks.
  • Repository inventory: nothing still refers to web_fetch/publication_target or the moved helpers. URLs in added lines all use example domains, and the diff adds no local paths or credentials.
  • Scope: web_fetch/report_publish.py no longer holds the orchestration, and the only remaining site request outside the owner is the separate rename command. publication_verify.py still makes its own read-only site requests for verification. Closes #178 is accurate. Nothing was published, and no real Artifact Site was called.

Mutation check

I ran 14 new local mutations on the adapters and publish.py against those 30 test files plus the golden tests; none was committed. Eight failed the tests and six survived:

Surviving mutation Assessment
Web Fetch inputs not frozen Same gap on base
Replay REVIEW not frozen Same gap on base; the final validate_package also checks its hash
Final validate_package removed from the bound lifecycle Same gap on base, on both tracks
WCXB profile guard off The snapshot also freezes the profile, so this check overlaps
Receipt lifecycle share URL check removed Code moved unchanged; not re-run on base
Sharing moderation check removed Code moved unchanged; not re-run on base

The wiring is correct by inspection in all six, so I am not raising them as findings against this PR. They could go in a separate test-coverage issue if the owner wants them pinned.

The PR's Test plan does not list the round 3 run or this head's CI result. Its CI line says to see the checks, so it is not misleading.

lanyue-llk added a commit that referenced this pull request Nov 3, 2026
Move the publication lifecycles to harness/reporting/publish.py and reduce Web Fetch, Web Search, public WebArena, WCXB, Browser Use and trajectory replay to adapters that name their own target, client and journals. Merge the Browser Use and replay copies into one bound lifecycle, and move the target rules beside the other shared publication primitives.
@lanyue-llk
lanyue-llk force-pushed the refactor/shared-report-publish branch from 22016d1 to f327411 Compare November 3, 2026 19:45

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Review complete · f327411

No findings in this review.

@lanyue-llk
lanyue-llk merged commit f7c18c1 into main Nov 3, 2026
7 checks passed
@lanyue-llk
lanyue-llk deleted the refactor/shared-report-publish branch November 3, 2026 19:54
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.

Move publish orchestration to one shared owner

1 participant