Repository source: docs/plans/private_access_confirm_timing/private_access_confirm_timing_one_shot.md
Cycle: v3/private_access_confirm_timing; Mode: one-shot; Record/index: plans index. Second of five one-shots from the "9 keys for ilyag want to read your messages" review (2026-11-25); siblings private_access_waiting_keys, private_access_one_evaluation (stacked on this one), private_access_signing_helper, private_access_card_settle.
Debug mode: enabled (project marker .railspike_debug_on)
Effort study: railspike-effort / v3/private_access_confirm_timing; host ledger private_access_confirm_timing.md. Standing P2 enrollment.
Extended estimates: enabled. No alternatives or work units, so no unit estimates.
Cycle estimate: 0.08
Status: implemented and committed; next permitted action: maintainer review (PR).
Feedback item: none matches (searched docs/feedback/items/).
Original request (maintainer, 2026-11-25): Confirm on the waiting-keys card "performs nowhere as instant on the frontend as on the awaiting users page". Claude's review noted that the approval endpoints send Server-Timing and the confirm endpoints do not, so the two cannot be compared in the browser's network panel.
Authorization: "can you do it in 5 one-shots please" (2026-11-25), on Claude's list that named this fix. Exclusions: making Confirm faster (private_access_one_evaluation and a later, measured decision on the commit path); merging and deploying are the maintainer's.
Bounded outcome and work type: application change (instrumentation).
/api/prepare_private_access_confirmation,/api/confirm_private_accessand/api/private_access_statussend aServer-Timingheader, as/api/prepare_approvaland/api/create_prepared_approvaldo, and keep theirno-storeheaders.The writer times the confirm's phases:
policy(the access evaluation) in prepare;policy,verify(signature),commit(the git transaction) andstatus(the access answer returned) in finalize. Lock wait and the other entrieswithTimedWriteLockalready records stay.As with approvals, the timings move from the JSON body into the header.
Approach and reuse decisions:
Reuse
RouteServices::mergeResultTimings(),serverTimingHeaders()andnoStoreHeaders(), which the approval controller uses, andLocalWriteService::timePhase()for phases. No new helper.The confirm JSON body drops
timings.private_access_confirm.jsreads onlystatus,error,prepare_token,canonical_recordandhas_access; nothing else calls these endpoints (checkedpublic/assets,public/quill.*,scripts/).
Risks: none material. Timing calls cost microseconds; header names follow the existing [a-z_] filter.
Completion conditions: in the browser's network panel, a Confirm click shows the two requests with Server-Timing entries naming the phases. Deploy with Deploy now; no schema or flag change.
Concepts touched: Private key access (used unchanged).
Verification and recovery plan: ./v3 test --smoke PrivateAccessConfirmationTest ApplicationServerTimingTest with an assertion on the phase names; git diff --check. Full suite not run. The header itself is set by PHP's header(), which the CLI tests cannot read; recorded as verified only through the shared helpers' tests and code reading. Recovery: revert the commit.
Starting revisions and branch: fix/private_access_confirm_timing from origin/main 797971a.
Planning commit: be02096 (plan and index entry only, before any implementation).
Study history:
2026-11-25 UTC, intake and execution entry: 0.08. Recorded after inspecting the controller and writer, so not a clean intake. Claude, single exposed rater. Scope v1. Reference R1, hashes not re-verified.
Dated execution history:
2026-11-25:
privateAccessConfirmation()inIdentityApprovalAndInvitationApiControllertimesrequest_data, merges the writer's timings withmergeResultTimings(), sendsServer-Timingbesideno-store, and dropstimingsfrom the body; errors sendrequest_dataandtotal. Addition.2026-11-25:
preparePrivateAccessConfirmation()timespolicy;finalizePrivateAccessConfirmation()timespolicy,verify,commitandstatuswithtimePhase(). A repeat of an accepted confirm reportsstatusonly. Addition.2026-11-25:
PrivateAccessConfirmationTest::testRepeatOfTheAcceptedConfirmIsANoOpasserts the phase names.2026-11-25, discovery (local test repository, one run, printed and then removed): prepare
policy3.3 ms, lock held 3.8 ms; finalize lock held 311.6 ms:policy4.1,verify85.8,commit127.1,status94.2.statusis about one more gpg run becauseprivateAccessStatus()re-reads the confirm record just written, andPrivateAccessConfirmation::read()verifies its signature again, both directly and throughPrivateKeyAccess. Handed toprivate_access_one_evaluation.
Study history, closeout:
2026-11-25 UTC: retrospective scope assessment 0.08. Delivered as planned. Claude, single exposed rater. Maintainer judgment pending; measured time unknown.
Outcome: delivered. Confirm's two requests now show where their time goes in the network panel, named like the approval endpoints' timings.
Verification:
Passed:
./v3 test --smoke PrivateAccessConfirmationTest ApplicationServerTimingTest: 504 run, 504 passed. Full suite not run.Passed:
php -lon the changed files;git diff --check.Unverified here: the
Server-Timingheader on a real request (PHP'sheader()is not observable in the CLI tests). The helpers it uses are covered byApplicationServerTimingTest. Check in the network panel after deploying.Inapplicable: markup, themes, icons, schema, flags.
Final review: the diff touches the controller, LocalWriteService.php, one test, this record, the plans index, the ledger and the debug log. Existing helpers only.
Commit/merge/publication status: completion commit e18d1de on fix/private_access_confirm_timing; PR https://github.com/gulkily/v3/pull/422 opened 2026-11-25; not merged. private_access_one_evaluation (#423) is stacked on this branch.
Debug: debug log.
Enhancement requests: none.
Attribution: Claude · 2026-11-25 UTC · Model: claude-opus-5-5