Skip to content

fix: sync error and expires in Order/Authorization update()#75

Draft
toddr-bot wants to merge 1 commit intomainfrom
koan.toddr.bot/fix-order-update-stale-fields
Draft

fix: sync error and expires in Order/Authorization update()#75
toddr-bot wants to merge 1 commit intomainfrom
koan.toddr.bot/fix-order-update-stale-fields

Conversation

@toddr-bot
Copy link
Copy Markdown
Contributor

@toddr-bot toddr-bot commented Apr 12, 2026

What

Order and Authorization update() methods now sync all server-mutable fields, not just a subset.

Why

When an ACME order becomes "invalid", the server includes an error field (RFC 7807 problem document) explaining what went wrong. Order::update() only synced status and certificate, silently dropping the error. Users polling an invalid order had no way to diagnose the failure.

Similarly, expires was never synced in either Order::update() or Authorization::update(), meaning expiry times went stale after polling.

How

  • Added error and expires to Order::update() field list
  • Added expires to Authorization::update() field list
  • Added error to Order's _ACCESSORS with POD documentation
  • Updated mock server to support order error and expires simulation

Testing

  • 4 new subtests covering error field population, error clearing, order expires update, and authz expires update
  • All 315 existing + new tests pass

🤖 Generated with Claude Code


Quality Report

Changes: 5 files changed, 202 insertions(+), 3 deletions(-)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

Order::update() only synced status and certificate, silently dropping
the error field that ACME servers send when an order goes invalid
(RFC 8555 §7.1.3). Users polling an invalid order had no way to find
out why it failed.

Also sync expires in both Order and Authorization update(), since
servers may update expiry times between polls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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