Skip to content

Harden X publishing retries and sample concurrency - #353

Merged
cdcavell merged 2 commits into
mainfrom
codex/harden-publish-x-retries
Sep 22, 2026
Merged

cdcavell merged 2 commits into
mainfrom
codex/harden-publish-x-retries

Conversation

@cdcavell

Copy link
Copy Markdown
Contributor

Summary

  • stop retrying ambiguous X POST failures after network errors or HTTP 5xx responses while retaining safe 429 retries
  • use UTF-8 OAuth signing, inject the OAuth timestamp for tests, and avoid tight Retry-After loops
  • synchronize the bounded-use sample read, document process-lifetime state retention, and expand .NET artifact ignores

Validation

  • dotnet run --file tools/publish-x.cs -- --self-test
  • dotnet restore samples/Samples.slnx --locked-mode
  • dotnet build samples/Samples.slnx --configuration Release --no-restore
  • dotnet format samples/Samples.slnx --verify-no-changes --no-restore --verbosity minimal
  • dotnet test samples/Samples.slnx --configuration Release --no-build (300 passed)

Copilot AI lite review requested due to automatic review settings September 22, 2026 01:29

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The OAuth self-test does not validate the generated signature, leaving signing regressions undetected.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Hardens X publishing retries and improves concurrency handling and documentation in the bounded-use sample.

Changes:

  • Avoids unsafe POST retries while retaining bounded 429 retries.
  • Adds UTF-8 OAuth signing and injectable timestamps.
  • Synchronizes sample use-count reads and expands .NET artifact ignores.
File Summary
tools/​publish-x.cs Retry, OAuth, and self-test updates. Moderate finding: the self-test should assert the OAuth signature using deterministic inputs.
samples/​replay-protection-and-bounded-use/​Sample/​ReplayProtection.cs Thread-safe use-count observation and lifecycle documentation.
.gitignore Additional IDE, test, coverage, and package artifact ignores.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/publish-x.cs Outdated
Copilot AI review requested due to automatic review settings September 22, 2026 09:33

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

Retry semantics, OAuth signing, and concurrency changes warrant final human review.

Review effort: Lite
Findings: None

Resolved since last review (1)

@cdcavell
cdcavell merged commit d77c7b2 into main Sep 22, 2026
14 checks passed
@cdcavell
cdcavell deleted the codex/harden-publish-x-retries branch September 22, 2026 09:38
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.

2 participants