{"baseRefOid":"11332d92a32786947ebbf8179b0e45ac3c7668d4","body":"## Observed discrepancy\n\nObservation CDLHROVR3JSYZYQSESBPTBD2YL and accepted outcome auto-20261008T201934.393464000Z record COFFEE-250 quantity 5 with WELCOME100, unit price 1000 cents, discount 100 cents, HTTP 201, ledger total 4500 cents and one write. The owner-approved README.md at 9b8dae6dde77512050847af998410764716655cd explicitly requires WELCOME100 to subtract 100 cents once from the order subtotal regardless of item count. Expected total is 1000*5-100=4900 cents, so the recorded effect is 400 cents short.\n\n## Proposed change and provenance\n\nThe observation serving build build-530a6bde7c6102f381a170a6e7a2abc8fc951e4608607a589bb92f0d466d55dc maps through service-reported provenance to source commit 11332d92a32786947ebbf8179b0e45ac3c7668d4 with revision_matches and source_matches_commit true. The source baseline is distinct from the pinned contract commit. Baseline checkout.go computes (UnitPrice-Discount)*Quantity, explaining the recorded total. The candidate computes UnitPrice*Quantity-Discount and preserves one ledger write. Its additive TestWelcome100OncePerOrderPersistedLedger checks the persisted final total, create-receipt agreement, immutable replay and no second write.\n\n## Recorded execution and independent review\n\nBaseline reproduction job_a76cb83ff187b82ed2774424b520c3fb6600db63d19e3ca35d2b1a82dde809f9 failed at the intended persisted-ledger assertion: got 4500, wanted 4900. Candidate go-test-all job_dfed08d7eb7b60fcd57f325929265b8f7cd893e79fd05129dc4916020e7e6fb5 and go-vet-all job_d6b3597a5de9487f00fa1787a25991f5b186d7b23458fdeada9881dc4d24aaed exited 0. Independent review reconciled verification verify_469fe6f997b7cd80c7b1710a8e2dd092231652a075eea4449c63888f5f39ae11 to succeeded, suite_passed true, expected_test_observed true and publication_eligible true, superseding the initial pending receipt. Service-issued review review_0a6f2402d7b4e45f22fde5ba9598094402e9d1666fbbc4c5ea93b3dac34a0975 approves exact candidate cand_b81b4dbf0dfa236fff546f624ec5911eacc5b307ff252f5d0068d44a8bb9faeb without blocking findings.\n\n## Existing work and limitations\n\nComplete open-PR discovery and complete bounded patch inspection found draft PR #14 (https://github.com/truvaagents/retail-order-service/pull/14, head 8780a58529608738faff5f2c6945097bb0a16a54) changes SKU selection and draft PR #11 (https://github.com/truvaagents/retail-order-service/pull/11, head 60077479b5777a26ccf4cd47ce65a1fc995f5b9a) changes maximum-quantity acceptance. Neither changes promotion arithmetic; those separate issues remain outside this candidate. Related assessment history is truncated and returned only expired ineligible candidates, so no historical approval transfers.\n\nThe observation feed is advisory, not a transactional outbox. Current catalogue evidence is current-release-only; build provenance is not signed attestation. Functional Kind execution does not attest production-grade isolation and may download pinned Go modules. This draft proposes a change only: it does not merge, deploy, repair the already-stored order, or establish production resolution.","commits":[{"authoredDate":"2026-10-08T20:22:26Z","authors":[{"email":"maintenance-automation@example.invalid","id":"","login":"","name":"Maintenance Automation (Example)"}],"committedDate":"2026-10-08T20:22:26Z","messageBody":"Maintenance-Case: case_9184d315e396d79fa8ade4f00ae16b15cfb84c8d34685e17c25b8ec7f32feba5\nMaintenance-Candidate: cand_b81b4dbf0dfa236fff546f624ec5911eacc5b307ff252f5d0068d44a8bb9faeb","messageHeadline":"Apply WELCOME100 once to the order subtotal","oid":"314e4ae505feb5e87add36b2b54140c08f92a98b"}],"files":[{"path":"checkout.go","additions":2,"deletions":2,"changeType":"MODIFIED"},{"path":"promotion_once_regression_test.go","additions":38,"deletions":0,"changeType":"ADDED"}],"headRefOid":"314e4ae505feb5e87add36b2b54140c08f92a98b","isDraft":true,"number":15,"state":"OPEN","statusCheckRollup":[],"title":"Apply WELCOME100 once to the order subtotal","url":"https://github.com/truvaagents/retail-order-service/pull/15"}
