Skip to content

Verify pending record writes drain within shutdown grace - #1654

Open
prk-Jr wants to merge 23 commits into
feat/1574-axum-shared-identityfrom
test/1579-record-write-stop-ci
Open

prk-Jr wants to merge 23 commits into
feat/1574-axum-shared-identityfrom
test/1579-record-write-stop-ci

Conversation

@prk-Jr

@prk-Jr prk-Jr commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Verify request-time and after-response identity-record writes through the normal production release image and real DynamoDB provider against disposable DynamoDB Local. Each scenario observes draining, holds the selected write for another 250 ms, releases it, requires normal exit, and compares the complete held, proxy-verified and post-exit native payloads and generations. The request-time response must complete during drain; the after-response page must already be complete while its follow-up write remains paused.

The after-response verifier additionally requires the application's existing INFO After-response lookups: write outcome=written record between genuine INFO draining and stopped lifecycle records. This proves the application awaited the result: a durable row alone can exist even when the SDK reply is lost. Retain those three selected raw log lines in the JSON evidence. Binary-mode log capture completes within the existing observation deadline.

Missing app-config secrets follow the accepted global #1142 failure-router policy: /health stays 200 while /ready and application routes return the fixed 503. The fixture requires the complete same-line missing-secret cause and initialization failure before any matching runner lifecycle-ready event. That runner event describes its listener, not application readiness. Failures before Trusted Server's initializer, including EdgeZero provider preparation, can still exit nonzero.

The observation bound is 3,500 ms: configured 3,000 ms grace plus 500 ms for Docker delivery and observation. Grace-expiry cancellation remains untested. Shared UID and timeout helpers preserve the existing conditional-write/key guards, separate 20-second operation/5-second log caps, and rejection before Docker invocation when the deadline has expired.

Verification

  • Required local checks: all 21 repository gate groups passed, including a fresh exact default-parallel cargo test-axum --locked run after the earlier serialized run; 16 supplementary current-CI checks also passed.
  • Full pinned-Node JS build/test: 83 files, 3,379 tests; JS/docs lint, formatting and documentation build passed.
  • Both canonical normal Linux ARM64 image jobs passed with the application as PID 1. No application --init or test-utils binary substitutes were used.
  • A real commit followed by a one-shot lost SDK reply leaves normal app exit and the exact durable payload, but the corrected full fixture rejects at the new application-completion assertion. Replaying the captured state through the old verifier accepts it. A separate capture-omission control also rejects that assertion; the unchanged positive fixture passes afterward.
  • Current target integration: the current harness also passed both image jobs, both negative controls and the positive rerun for the clean object-only combined tree with target 5481268. All 678 compiled context inputs matched retained normal target images exactly; their actual producer/version metadata remains 6fecd437. No branch merge or rebase was performed.
  • Published-head hosted CI: pending. Historical green checks do not qualify this correction; review threads remain open until its required checks complete.

Local image proof covers Docker Desktop's Linux ARM64 runtime and synthetic local services. Hosted Ubuntu, browser, stock-celld and release-specific checks remain separate CI evidence. This does not qualify hosted AWS/IAM, deployed capacity or a write held past the shutdown grace. Local HTML EOF checks are not triggered: the full PR does not change EOF finalization, publisher or HTML-processor code.

Design and scope

Design · Plan

The fatal-secret-before-listening criterion in #1579 remains unreconciled with the accepted global #1142 contract. This PR references that work and does not claim issue closure. No issue edits or branch integration are included.

Depends on #1646.

Refs #1579.

@prk-Jr prk-Jr self-assigned this Nov 23, 2026
@prk-Jr
prk-Jr marked this pull request as ready for review November 23, 2026 12:19
prk-Jr and others added 2 commits November 23, 2026 18:32
PR #1532 now reads the native Geo profile path from
TRUSTED_SERVER__NATIVE_GEO_PROFILE_FILE instead of TS_NATIVE_GEO_PROFILE_FILE. No file in this PR
uses the old name after the merge, so the merge only takes the rename from
PR #1646. The merge had no conflicts.
@aram356

aram356 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

For #1532's rename of the native Geo profile variable to TRUSTED_SERVER__NATIVE_GEO_PROFILE_FILE, I pushed b8addd3f2 here, one merge of this PR's base:

No file in this PR uses the old name after the merge, so it only takes the rename from #1646. The merge had no conflicts.

Correction: through #1566, this merge also carries five #1540 commits that #1566 had not merged before (CloudFront forwarding authentication, AWS ingress and Terraform demo prerequisites, the example deployment gate and the deployment guide). It is not only the rename.

This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids
from the Prebid config into the auction EIDs, and a99dd66, a62601b,
d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30
days from the UTC day start and pass the request time into finalize. They
arrive through the chain's merges into #1639, #1640, #1612, #1628, #1623,
#1531, #1532, #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540,
#1566, #1624, #1641, #1642 and #1646, with #1646's move of the request
time into IdentityApp::finalize. It also brings d5276ee, which publishes
the native AWS runtime files without GNU mv -T, and Christian's merge
5597d3e of #1538 into #1540, through #1566's merge.

The base now also carries the Axum serving line (#1613, #1616, #1617, #1615,
#1635, #1637 and #1627), which #1533 merged, and #1627's b958107, which
decodes the Spin discovery document with Response::json, and #1627's merge
of #1625 (006b45e), which pins Wrangler for the Cloudflare smoke and CI.

The merge also brings the 12 #1646 commits this PR lacked, from 48a43ae
to 461aa0d: dhruv8sh's page-phase lookup and /auction EID work
(48a43ae, 82fe088, 1d0a74f, 838586e and his chain merges a061c01,
ecf16e8, e1d23a0, edcf4c5 and 9a020e1), the merge 9cad928 of
#1641 into #1642, and prk-Jr's "Merge providers-awaited into shared
identity" (4ffbaf8) and "Restore Fastly auction browser gating"
(461aa0d).

It also brings b2d4bfd from #1488, which records the known UID hashes
on lookup results with a setter, so the provider IDs the write planner
logs are not derived from them.

The base now also carries #1506's repin of EdgeZero to rc/identity at
d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly
0.13.3, url 2.5.9 and Viceroy 0.22.0.

The base now also carries #1627's 4d0c1a2, which renames the generic
runtime KV store to trusted_server_runtime_kv, #1488's a610152 and
9104fd3, which add hashed-email intake for the LiveRamp and ID5
identity providers, and #1646's aa31559, which gates identity writes for
rejected clients.

This PR's head moves to 8478372, which releases every paused
request-time write during drain, through be48eef, its clean merge of
#1646's aa31559. Taken as the change from the old head b8addd3, the
new head would replay #1646 commits the base already carries in rebuilt
form and conflicts in six files. be48eef is a clean merge of
aa31559, which the base has, so the merge takes the change from
be48eef: 8478372's scripts/test-native-ec-image.mjs edit, which
applies cleanly.

The base now also carries #1646's 4f4c036, which expects the failure
router in the native container startup test, and #1488's f063a76,
which lets the hashed-email status call use POST, a body and extra
headers.

scripts/test-native-container.mjs conflicts in the invalid-input check:
4f4c036 lets readiness follow the initialization failure, since the
process keeps serving the failure router, and asserts each input's own
diagnostic, while this PR asserts the missing-secret store message and
matches only a lifecycle ready event. The merge keeps 4f4c036's
diagnostic and ordering checks and this PR's missing-secret check, and the
ordering check finds the ready event with this PR's lifecycle pattern.
aram356 added a commit that referenced this pull request Nov 25, 2026
…hutdown grace into rc/identity

#1654 (3fafec4) is on #1646, and its merge brings the Fastly SDK 0.13.3
upgrade. The merge is clean.
@aram356

aram356 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 3fafec41a, a merge of #1646's new head b5a5f62f8 onto this PR's 8478372d6. It brings #1646's 4f4c03689, which expects the failure router in the native container startup test, and 71a573a08, the chain below, and #1506's repin of EdgeZero to rc/identity at d063a8e7 with main's Fastly SDK upgrade (#1671).

The one conflict was the invalid-input check in scripts/test-native-container.mjs: 4f4c03689 lets readiness follow the initialization failure, since the process keeps serving the failure router, and asserts each input's own diagnostic, while this PR asserts the missing-secret store message and matches only a lifecycle ready event. The merge keeps 4f4c03689's diagnostic and ordering checks and this PR's missing-secret check, and the ordering check finds the ready event with this PR's lifecycle pattern.

#1646's new head 9f648f6 brings #1537's b181544, "Accept any Fastly EC
store link name at startup", which #1537's owner merged up through #1539,
#1538 and #1540. The merge is clean.
aram356 added a commit that referenced this pull request Nov 26, 2026
#1654 (1dccbde) carries #1537's b181544, "Accept any Fastly EC store link
name at startup", through the chain below it. The merge is clean.
@aram356

aram356 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 1dccbde78, a merge of #1646's new head 9f648f694. It brings #1537's b181544a0, "Accept any Fastly EC store link name at startup", which #1537's owner merged up through #1539, #1538 and #1540. The merge had no conflicts.

Takes #1646's new head 9333826, which carries #1506's repin of EdgeZero to
rc/identity at 459bd27d (42e0c46): PR 275 at 0e2a58ae, the stack's test
fixes and EdgeZero 536's bounded record update, RecordHandle::update.

The merge is clean.
aram356 added a commit that referenced this pull request Nov 26, 2026
#1654 (8bb24b4) carries #1506's repin of EdgeZero to rc/identity at
459bd27d (42e0c46), with PR 275 at 0e2a58ae, the stack's test fixes and
EdgeZero 536's bounded record update, RecordHandle::update, through the
chain below it. The merge is clean.
@aram356

aram356 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 8bb24b49d, a merge of #1646's new head 933382699, which brings #1506's repin of EdgeZero to rc/identity at 459bd27d (42e0c46c7): EdgeZero #275 at 0e2a58ae, the EdgeZero stack's test fixes and EdgeZero #536's bounded record update, RecordHandle::update. The merge had no conflicts.

#1646's merge made the container test expect the failure router for
invalid application inputs: the process keeps listening, liveness stays
up, and every other route answers the unavailable response. The
missing-secret case still ran under a seccomp profile that denies bind
and listen, so the adapter could not open its listener, exited with
"address unavailable", and failed "must keep serving the failure router".

Drop that profile. The case still proves its own cause: the log must name
the missing secret in the prepared secret store, and initialization must
fail before the lifecycle ready line.
#1646's new head 4f1c155 brings #1539's cf4e815, "Expect the failure router in the native container test", and #1646's a18abf4, "Compare undeclared Axum KV stores with assert_eq". The merge is clean.
aram356 added a commit that referenced this pull request Nov 26, 2026
…dentity

#1654 (ca143b7) carries #1539's cf4e815, "Expect the failure router in the native container test", and #1646's a18abf4, "Compare undeclared Axum KV stores with assert_eq" and #1654's own 8d8892b, "Let the missing-secret container case keep its listener". The merge is clean.
@aram356

aram356 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 8d8892ba4, "Let the missing-secret container case keep its listener", then ca143b7f3, a merge of #1646's new head 4f1c15544. Since 3fafec41a merged #1646's failure-router expectation, the missing-secret case still ran under the seccomp profile that denies bind and listen, so the adapter could not open its listener, exited with "address unavailable" and failed "must keep serving the failure router". This also failed local-provider-image on #1608. The commit drops that profile. The case still checks that the log names the missing secret in the prepared secret store and that initialization fails before the lifecycle ready line. Locally, the full container test passes on 8d8892ba4. The merge brings #1646's a18abf428, the reworked KV check in the store metadata test, and had no conflicts.

@dhruv8sh dhruv8sh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Summary

This PR changes only tests and docs. There are no changes to production Rust, the Dockerfile or dependencies. It runs the request-time SIGTERM case in scripts/test-native-ec-image.mjs inside one signal-to-exit deadline (3 s grace + 500 ms for Docker) and adds an after-response drain case. It also tightens the missing-secret and ready checks in scripts/test-native-container.mjs. No issues found. This review is based on the diff only. The scripts were not run locally.

Cross-cutting / body-level findings

  • 👍 One monotonic deadline for request-time SIGTERM — In scripts/test-native-ec-image.mjs, the request-time SIGTERM case now runs inside a single signal-to-exit deadline: the 3-second grace plus 500 ms for Docker. The deadline uses a monotonic clock, and the time left is passed into every Docker and response wait. After the process exits, the test reads the native row straight from DynamoDB and compares the whole row with the acknowledged write.
  • 👍 New after-response drain case — The new case in scripts/test-native-ec-image.mjs uses a cookie-only SharedID provider. It pauses only the conditional write that carries the UID. It then checks the full response, the drain, the 250 ms hold, the release and a normal exit. Afterwards it checks that the UID is still in the row and that the generation went up.
  • 👍 Tighter assertions in scripts/test-native-container.mjs — The missing-secret startup case must now log the specific diagnostic (is missing in trusted_server_secrets). The ready check now only matches lifecycle events with phase=ready.
  • 👍 Careful deadline handling and cleanup — The deadline helpers fail the assertion when a deadline has already passed. Timers are cleared, and the pause flag is reset during cleanup.
  • 👍 Docs are honest about remaining gaps — The doc and limitations entries say plainly that the grace-expiry case (a write held past the configured grace) is still untested.

CI Status

  • integration tests: PASS
  • integration tests (Fastly EC lifecycle): PASS
  • browser integration tests: PASS
  • trace runtime and browser acceptance: PASS
  • cargo test (ts CLI, native) (macos-latest): PASS
  • local-provider-image: PASS
  • cargo check (cloudflare native + wasm32-unknown-unknown): PASS
  • CI Node pin guard: PASS
  • Fastly response diff script: PASS
  • CLAUDE.md symlink guard: PASS
  • health-startup (spin): PASS
  • worker-deadlines (spin): PASS
  • record-provider-image: PASS
  • health-startup (axum): PASS
  • HTML EOF runtime (Fastly): PASS
  • worker-deadlines (cloudflare): PASS
  • health-startup (fastly): PASS
  • cargo test (axum native): PASS
  • stock-celld-records: PASS
  • Native provider acceptance script: PASS
  • cargo test: PASS
  • health-startup (cloudflare): PASS
  • cargo fmt: PASS
  • cargo check/build/test (spin native + wasm32-wasip1): PASS
  • format-typescript: PASS
  • cargo test (cross-adapter parity): PASS
  • format-docs: PASS
  • cargo test (ts CLI, native) (ubuntu-latest): PASS
  • prepare integration artifacts: PASS
  • docs-proposal scripts: PASS
  • ts dev lint domains (changed lines): PASS
  • release scripts: PASS
  • vitest: PASS

Takes #1646's new head 6b4a5fd, which carries #1506's repin of EdgeZero to
rc/identity at 1619078a (8edc50e), a revert that removes EdgeZero 522
(portable Fastly record providers) and 524 (outbound mTLS client
identities).

The merge is clean.
aram356 added a commit that referenced this pull request Nov 27, 2026
#1654 (30e50a6) carries #1506's repin of EdgeZero to rc/identity at
1619078a (8edc50e), a revert that removes EdgeZero 522 (portable Fastly
record providers) and 524 (outbound mTLS client identities), through the
chain below it. The merge is clean.
@aram356

aram356 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 30e50a6c5.

Takes #1646's new head 6b4a5fd, which carries #1506's repin of EdgeZero to rc/identity at 1619078a (8edc50e), a revert that removes IABTechLab/edgezero#522 (portable Fastly record providers) and IABTechLab/edgezero#524 (outbound mTLS client identities).

The merge is clean.

@ChristianPavilonis ChristianPavilonis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the five files changed by #1654 against #1646 at 6b4a5fdc0. Both native-image jobs passed on this exact comparison. The record artifact showed normal exit in 365 ms for the request-time case and 358 ms for the after-response case, with matching rows read after exit. Grace expiry remains outside the test's scope. Inline comments cover a gap in what the after-response test proves, stale startup documentation, and smaller fixture improvements.

logicalKeyMatches(put.key, afterEc) &&
decode(put.item).ids?.[afterResponseSource]?.uid === afterResponseUid
)
assert(followup, 'after-response UID must reach an acknowledged write')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

R1 · P1: Verify that the app completed the after-response write. verifiedPuts records DynamoDB's success before the proxy replies to the app (lines 400–434). If the app survives the hold but exits after the proxy forwards the PutItem and before it receives the result, DynamoDB can still commit. The post-exit lookup accepts that row. An isolated check using the committed helpers passed with shutdown-exited before put-verified-before-ack and no app acknowledgement.

For this isolated SharedID case, require the existing After-response lookups: write outcome=written log between phase=draining and phase=stopped. The app emits it only after awaiting the write result. Keep the exact post-exit row comparison, and add a control that lets DynamoDB commit but withholds the SDK reply. The request-time case already has a separate check that the app returned the matching cookie.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 15235e2. The shared post-exit verifier now requires the existing application INFO write outcome=written between genuine draining/stopped records, alongside normal exit and exact held/proxy/post-exit payload and generation equality. Both normal Linux ARM64 image jobs pass. A real DynamoDB commit followed by a one-shot lost SDK reply leaves a matching durable row and app exit 0, yet the full fixture now rejects at this exact new assertion; replaying that captured state through the old verifier accepts it. The unchanged positive fixture passes again afterward. Published-head CI is still pending, so I am leaving this thread open until it finishes.

Comment thread docs/guide/native-container.md Outdated
The test creates a private Docker network, a synthetic publisher origin and temporary local configuration. It checks that invalid configuration and missing secrets serve the failure router (`/health` `200`, `/ready` and routes `503`), the published listener, HTML rewriting, embedded JS, non-root execution, CA roots, writable mounts and SIGTERM draining with a request in flight. Fixtures use only `example.com` identities and synthetic secrets. The test removes its containers, network and temporary files on completion.

The `Native container` workflow builds the local-provider image and runs this test on relevant pull requests or manual dispatch. It does not publish an image or deploy a service.
The missing-secret container uses a temporary seccomp profile that makes `bind` and `listen` fail with EPERM. It must still exit non-zero with both `Trusted Server initialization failed` and `is missing in trusted_server_secrets` in its log. Port probes and the absence of a ready lifecycle event are additional checks. A listener failure before secret validation cannot substitute for the required missing-secret diagnostic.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

R2 · P2: Document the missing-secret check that actually runs. The fixture requires the process to keep listening with /health returning 200 and /ready and / returning 503. It checks the prepared-store diagnostic and orders initialization failure before any matching lifecycle-ready event. The hosted run emitted that ready event. It does not test seccomp, a nonzero exit, or rejection before the port opens. The failure router is inherited from #1646.

Please also update the design, completed plan, and PR description, and reconcile #1579's original nonzero-before-listening criterion before claiming closure.

Suggested change
The missing-secret container uses a temporary seccomp profile that makes `bind` and `listen` fail with EPERM. It must still exit non-zero with both `Trusted Server initialization failed` and `is missing in trusted_server_secrets` in its log. Port probes and the absence of a ready lifecycle event are additional checks. A listener failure before secret validation cannot substitute for the required missing-secret diagnostic.
For missing secrets, the test checks that the failure router keeps liveness up while readiness and application routes return `503`. It requires the initialization failure and the prepared-store missing-secret diagnostic, and checks that initialization failed before any matching runner `phase=ready` event. This does not assert a nonzero exit or that the listener never opens.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 15235e2. The guide, design, completed plan and PR description now describe the existing failure router: health 200, readiness/application 503, and the initialization failure before any matching runner-ready event. Both normal-image jobs pass. The PR now uses Refs #1579: its original fatal-secret-before-listening criterion remains unreconciled with the accepted global #1142 policy, so this PR does not claim to close that issue. Published-head CI is pending.

Comment thread scripts/test-native-ec-image.mjs Outdated
'follow-up write must advance the record generation'
)
record(
'full response precedes SIGTERM with a pending after-response SharedID write, then durable drain within grace'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

R3 · Non-blocking: Name the exit observation bound. The fixture accepts up to 3,500 ms including Docker delivery and observation. The CI result should not imply that it checks a hard 3,000 ms cutoff or grace expiry.

Suggested change
'full response precedes SIGTERM with a pending after-response SharedID write, then durable drain within grace'
`full response precedes SIGTERM with a pending after-response SharedID write; exit observed within ${shutdownBoundMs} ms`

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 15235e2. The result names the 3500ms exit observation bound explicitly: configured 3000ms grace plus 500ms Docker delivery/observation allowance. Grace-expiry cancellation remains explicitly untested. Actual normal-image shutdown cases pass within that observation bound; published-head CI is pending.

Comment thread scripts/test-native-container.mjs Outdated
'must reject application inputs, not fail the launcher'
)
assert.match(logs, diagnostic, `${label} must report its own cause`)
if (label === 'missing-secret')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

R4 · Non-blocking: Put the full diagnostic in the fixture row. Renaming this display label would silently drop the prepared-store check. Extend the row's regex to /required app-config secret at .* is missing in trusted_server_secrets/ and remove this branch. That also requires the two parts to match one diagnostic.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 15235e2. The fixture row owns the complete same-line missing-secret diagnostic, including an exact trusted_server_secrets token, and the display-label branch is removed. Actual-loop controls accept a renamed label with the complete cause and reject missing/split/wrong-store diagnostics. The normal local-provider image job passes; published-head CI is pending.

Comment thread scripts/test-native-ec-image.mjs Outdated
assert.deepEqual(
delayedPut.item,
heldRequest.item,
'drain must commit the selected request write'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

R5 · Non-blocking: Keep both payload comparisons in the shared verifier. Both scenarios compare the held payload with the acknowledged one before calling verifyAfterExit. Pass held to the verifier so it checks both equalities: held payload, acknowledged payload, and direct DynamoDB read after exit. This keeps a later caller from omitting the first comparison.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 15235e2. Both actual callers pass the held write to the shared verifier, which compares held payload, proxy-verified payload and direct post-exit DynamoDB row in full, including generation. Changed-held and changed-final-generation controls reject, and both normal-image shutdown scenarios pass. Published-head CI is pending.

Comment thread scripts/test-native-ec-image.mjs Outdated
write &&
pauseAfterResponse &&
payload.ConditionExpression?.includes(':expected') &&
decode(payload.Item).ids?.[afterResponseSource]?.uid === afterResponseUid

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

R6 · Non-blocking: Share the fixture UID selector. The acknowledged-write lookup repeats this exact decode and UID match at lines 1163–1167. A shared predicate keeps the pause and verification selecting the same item if the fixture record shape changes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 15235e2. A shared source/UID predicate now selects the paused after-response write and its verified payload. Existing write/conditional/pause/native-key checks stay at their respective boundaries. Source/UID mismatch controls reject and the actual normal-image follow-up still reaches the selected conditional write. Published-head CI is pending.

Comment thread scripts/test-native-ec-image.mjs Outdated
? 20000
: Math.min(
20000,
remaining(deadline, 'SIGTERM observation deadline')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

R7 · Non-blocking: Share the Docker deadline calculation. This clamp and the one in logs() at lines 457–466 enforce the same observation deadline. Extract the calculation and keep the separate default caps and diagnostics.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 15235e2. Both actual Docker callers use one remaining-deadline calculation while keeping distinct 20s operation/5s log caps and diagnostics. Actual-caller controls verify both caps and rejection before subprocess invocation when expired; all deadline/runtime checks pass. Published-head CI is pending.

PR #1646's new head brings its identity consent and delivery boundary enforcement, plus the cascaded owner review fixes from #1525, #1526, #1488, #1489, #1639, #1531, #1532, #1615, #1637, #1533, #1536, #1535, #1537 and #1538. The merge is clean.
PR #1646's new head brings wave B: #1506's merge of main ab5c24f (#1501, js_asset_proxy rewriter ordering) and its repin of EdgeZero to rc/identity 8a73c0978806, carried up through the chain. The merge is clean. Cargo.lock changes only the 10 EdgeZero package sources, now at 8a73c097; the codegen crate's nested Cargo.lock is unchanged.
aram356 added a commit that referenced this pull request Dec 1, 2026
One octopus merge of the round 12 tips into rc/identity c3e3366. It is a single octopus because the RC already holds every sibling's old head, so each tip's new head merges in alongside the others rather than as a chain of merges. The tree is the automatic merge of the RC and all tips, with no resolution: every tip pair, their union and the merge into the RC are clean.

Tips, in parent order after the RC:

- PR #1503 at 4225024
- PR #1653 at 4bd4903
- PR #1654 at 95cf3e8
- PR #1655 at 05c509d
- PR #1622 at afe5217
- PR #1660 at c1a05d7
- PR #1666 at 108b122
- PR #1659 at 5fb8190
- PR #1709 at 6d152f6
- PR #1710 at dcceeee
- PR #1713 at cae7801
- PR #1557 at 302e972

PR #1659 sits above PR #1718, so it carries PR #1714, PR #1717 and PR #1718.
@aram356

aram356 commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Round 12 identity realignment: rc/identity is now at db7dce634, and EdgeZero is pinned to its rc/identity at 8a73c097. This branch fast-forwarded from 30e50a6c5 to 95cf3e8fa:

Each merge message says what it carries and how any conflict was resolved.

PR #1646's new head brings #1535's owner fix that keeps mirrored GPP consent through transient CMP not-ready states (#1678), #1535's move of the consent-update test host to publisher.example.com for the URL-host lint and #1540's allow-domain marks on the deployment guide's reference links. The merge is clean.
aram356 added a commit that referenced this pull request Dec 2, 2026
It brings #1535's owner fix that keeps mirrored GPP consent through transient CMP not-ready states (#1678), #1535's and #1540's URL-host lint fixes, and #1622's move of the new GPP bridge tests into its split test file, carried up to every tip: #1653, #1654, #1655, #1622, #1660, #1666, #1659, #1709, #1710, #1713 and #1557. #1503 is already contained. The octopus tree is the conflict-free union of the tips.
PR #1646's new head brings #1506's move of the five auction endpoint test requests from test-publisher.com to publisher.example.com, for the URL-host lint. The merge is clean.
aram356 added a commit that referenced this pull request Dec 2, 2026
It brings #1654's cascade merge of #1506's auction endpoint test host fix.
PR #1646's new head brings #1506's repin of EdgeZero to rc/identity ef5cbf30, which renames Fastly backends to ez_b31v2_* and moves the yanked pin-project-lite, chacha20 and spin, #1625's shared Wrangler installer for CI, #1639's pull reserve boundary check and wording, #1613's conformance doc alignment, #1616's certificate policy and pull-sync fixture corrections, #1617's preserved startup diagnostics and hardened runtime checks, #1635's complete startup evidence in native fixtures, #1637's shared readable non-Unicode Geo fixture, #1627's Spin store reads and retained runtime coverage and #1535's Sourcepoint consent mirror deduplication and consent update coverage. The merge is clean. Cargo.lock changes only the EdgeZero package sources (now ef5cbf30) and the yanked pin-project-lite, chacha20 and spin; the codegen crate's nested Cargo.lock is unchanged.
aram356 added a commit that referenced this pull request Dec 3, 2026
PR #1503 at 1d51b78: Add ts ec show and ts ec eids admin diagnostic commands
PR #1653 at f217902: Clarify and verify the Axum local config handoff
PR #1654 at e4e68bb: Verify pending record writes drain within shutdown grace
PR #1655 at 7d0cdb2: Configure EC lifetime and renew it on eligible visits (DEC-13)
PR #1659 at bd707f2: Verify geo consent paths on Axum and Fastly
PR #1660 at 87c52cd: Retry an after-response write that loses its CAS
PR #1666 at b1d7062: Verify identity gates and provider deadlines on Axum
PR #1710 at 3d33359: Apply pull-sync consent checks to identify
PR #1557 at 3982143: Carry Sourcepoint TCF consent to Trusted Server
PR #1667 at f9ac6bb: Present a client certificate on auction providers that set mtls
PR #1607 at b3a0b09: Send the resolved client IP to the publisher origin
PR #1709 at 635f06a: Keep the EC out of bid request IDs and gate user.id on EID consent
PR #1713 at e5f4d05: Apply consent rules to first-party click redirects
PR #1622 at dd2ee39: Report CMP consent to the EC route and merge its answer into Prebid
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Round 15 identity realignment: rc/identity is now at 391a08578, and EdgeZero is pinned to its rc/identity at ef5cbf308. This branch fast-forwarded from 5a147ab5c to e4e68bb9b:

Each merge message says what it carries and how any conflict was resolved.

prk-Jr and others added 2 commits December 3, 2026 19:34
Require the existing application completion log during drain so a durable
row cannot conceal a lost SDK acknowledgement. Centralize payload, UID
and deadline checks and align startup documentation with the accepted
failure-router policy.

Refs #1579
Carries #1533's Axum startup-test port fix (779e446) and nothing
else. Owner commits pushed to other chain PRs since round 15 come in
with the next round.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Cascade of #1533's Axum startup-test port fix (779e44673): 69dbe9db3 merges it into this PR. There were no conflicts and nothing else changed. The fix moves free_loopback_port in crates/trusted-server-adapter-axum/tests/routes.rs below the ephemeral port range, and #1533's note has the details. Owner commits pushed to other chain PRs since round 15 come in with the next round. rc/identity is now 62f8e41e2.

@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Merged #1627's runtime KV removal (7c2b84f45) into this branch as 952e2d482, on top of 69dbe9db3.

At the maintainer's request, that commit removes the generic runtime KV store trusted_server_runtime_kv. Nothing reads or writes it, and the managed Fastly deploy made every service provision and pay for it. edgezero.toml and the Fastly Hooks::stores() now declare only trusted_server_kv, and RuntimeServices::kv_store() is unavailable on every adapter.

Only that commit was merged, not the base branch's new head. Conflicts were resolved in edgezero.toml, the Fastly Hooks::stores() in app.rs, fastly.toml, the Viceroy template, the integration tests' config.rs, trusted-server.example.toml, docs/guide/architecture.md and docs/guide/edgezero.md. Only trusted_server_kv stays declared, this branch's record-store comment and local seeds are kept, and the runtime-KV lines are dropped. The Axum README and docs/guide/axum-dev.md keep this branch's Axum wording.

Checks on this head: no reference to the removed store remains and cargo fmt --check passes; clippy-fastly, clippy-axum, clippy-cloudflare and clippy-spin-native pass. rc/identity (b9dc3153e) passed the full CI gate list with the removal.

PR #1646's new head brings its fix that preserves filter headers through identity finalization, plus #1487's change that strips `ts-eids` from publisher-origin requests unless the operator opts in. The merge is clean.
aram356 added a commit that referenced this pull request Dec 3, 2026
PR #1503 at 6a8797e: Add ts ec show and ts ec eids admin diagnostic commands
PR #1557 at a435778: Carry Sourcepoint TCF consent to Trusted Server
PR #1607 at 07086f2: Send the resolved client IP to the publisher origin
PR #1627 at 5b7fc3d: Wire declared stores and document unsupported Axum KV
PR #1636 at d838931: Drain Axum after-response identity tasks on SIGTERM
PR #1653 at 5b86d9b: Clarify and verify the Axum local config handoff
PR #1654 at be495b3: Verify pending record writes drain within shutdown grace
PR #1655 at 888c5f1: Configure EC lifetime and renew it on eligible visits (DEC-13)
PR #1659 at 7b1d4a7: Verify geo consent paths on Axum and Fastly
PR #1660 at 64a1baa: Retry an after-response write that loses its CAS
PR #1667 at 1359722: Present a client certificate on auction providers that set mtls
PR #1709 at bc43a3e: Keep the EC out of bid request IDs and gate user.id on EID consent
PR #1710 at dc728a1: Apply pull-sync consent checks to identify
PR #1713 at ffa7597: Apply consent rules to first-party click redirects
PR #1722 at 070e2b0: Use applicable GPP sections from the CMP instead of header sections

PR #1666 at 4720b0b (Verify identity gates and provider deadlines on Axum) arrives through #1659, and PR #1622 at c878e6e (Report CMP consent to the EC route and merge its answer into Prebid) arrives through #1722. Every other chain PR arrives through the tips above. The tree is the conflict-free union of these tips and carries no resolution of its own.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Round 17 identity realignment: rc/identity is now at 0ed862633, and EdgeZero stays pinned to its rc/identity at ef5cbf308. This branch fast-forwarded from 952e2d482 to be495b3d4:

Each merge message says what it carries and how any conflict was resolved.

aram356 added a commit that referenced this pull request Dec 4, 2026
PR #1660 at 3693ce9 now merges #1654 and points #1654's native record drain verifier at the after-response outcome line #1660 moved into ec::after_response. At 0ed8626 the native container check failed with "after-response application must report INFO written completion during drain". The merge is clean.
@aram356

aram356 commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Round 17 follow-up: #1660 now merges this branch, so rc/identity takes this PR through #1660. #1660 moved the after-response outcome log into ec::after_response and added a conflict count, so that link points this PR's drain verifier at trusted_server_core::ec::after_response and After-response lookups: write outcome=written conflicts=<n>. This branch itself is unchanged. The note on #1660 has the details.

@aram356

aram356 commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Merged #1614's /_ts/ local answers (48930c270) into this branch as 19963c982, on top of be495b3d4.

Trusted Server owns the /_ts/ namespace (#1740). A request for /_ts or any /_ts/ path that no route handles now gets a local 404 on Fastly, Axum, Cloudflare and Spin, and never reaches the publisher origin. The path is matched after percent-decoding. Paths outside the namespace, such as /_tsx or /articles/_ts/x, still go to the publisher origin, and every routed /_ts/ path answers as before.

This merge takes #1646's new head (72cc0ad35), which carries 48930c270 and nothing else new to this branch. It was clean.

Checks on this head: no conflict markers; cargo fmt --all -- --check passes; the merge adds exactly #1614's change to this branch's files; it merges cleanly with every lower head in its stack. rc/identity (e72407155) passed the full CI gate list with the change.

This branch has not been deployed

No deployments
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.

Run the SIGTERM-during-record-write test in CI (scripts/test-native-ec-image.mjs from #1536)

4 participants