Skip to content

Bound release network operations and recover Sentry finalization#573

Closed
baron wants to merge 1 commit into
mainfrom
wt/release-network-bounds
Closed

Bound release network operations and recover Sentry finalization#573
baron wants to merge 1 commit into
mainfrom
wt/release-network-bounds

Conversation

@baron

@baron baron commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add bounded connect, request, and aggregate retry deadlines to release, promotion, and SwiftFormat download networking
  • reconcile ambiguous Sentry release/deploy mutations through observe-before-decide state machines and add an explicit finalize-sentry recovery mode
  • preserve the protected existing-release guard and add deterministic fake-curl coverage for landed, lost, and unknown outcomes

Validation

  • make dev-release-preflight
  • python3 Scripts/test_release_tooling.py
  • python3 Scripts/test_release_promotion.py
  • make guardrails
  • bash -n Scripts/release.sh Scripts/promote_release.sh Scripts/install_format_tools.sh
  • git diff --check

Risk / rollout

No real release, Sentry, download, artifact, or app-lifecycle operation was used during validation. The recovery paths are bounded and fail closed when authoritative state cannot be established.

text=True,
capture_output=True,
)
calls = [json.loads(line) for line in call_log.read_text(encoding="utf-8").splitlines()]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The test fixture run_sentry_deploy_fixture reads call_log without checking if it exists, which can cause a FileNotFoundError if no API calls are logged.
Severity: LOW

Suggested Fix

Add a conditional check to ensure call_log.exists() is true before attempting to read the file. If the file does not exist, return an empty list. The implementation should be calls = ([json.loads(line) for line in call_log.read_text(encoding="utf-8").splitlines()] if call_log.exists() else []).

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: Scripts/test_release_tooling.py#L1694

Potential issue: In `Scripts/test_release_tooling.py`, the `run_sentry_deploy_fixture`
method reads the `call_log` file without first verifying its existence. If a test
scenario using this fixture completes or fails before any API calls are made and logged,
the file will not be created. This will lead to a `FileNotFoundError` when the code
attempts to read the non-existent log file, causing the test to crash. A similar
function, `run_sentry_prepare_fixture`, correctly includes a guard for this condition,
suggesting its omission here was an oversight.

Did we get this right? 👍 / 👎 to inform future reviews.

@baron

baron commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #579, which carries the reviewed release/tooling network-bounds work on current main and has a fully green exact-head CI matrix.

Related six-PR fix series, in recommended landing order:

@baron baron closed this Jul 18, 2026
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