Repository navigation
fix: close proactive follow-up decision gaps - #11873
Merged
Merged
Conversation
Run the existing read-only materialization report once a week inside the hourly notifications job, off the event loop. Every bounded aggregate verdict is routed through a reconciled Cloud Logging metric and Cloud Monitoring policy so even a zero-drop result reaches the existing production notification channels instead of disappearing into logs. Keep the operator CLI as the detailed source/block-type view, alarm on durable drops and malformed undated rows, and redact record contents from the scheduled log. Co-Authored-By: Claude Opus 5 <[email protected]>
Make referent supply a cross-field extraction contract: when the captured screen provides a specific subject, the statement, evidence text, and identifiers schema all require the same copied name or handle. Empty identifiers remain valid when the screen supplies none, and validity remains evidence-only so the retired destructive identifier gate does not return. The director stable prompt is unchanged; only the uncached extraction prompt and extraction schema change. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]>
Treat an inherited full non-blocking stdout or stderr pipe as backpressure, not a failed validation. Wait for POSIX pipe capacity and retry the buffered flush, with the portable short-wait fallback where descriptors cannot be selected; interrupted flushes retry immediately. Regression tests reproduce the observed Errno 35 twice before a successful flush. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]>
Declare the existing SYNC_BACKFILL_ALERT_NOTIFICATION_CHANNELS GitHub variable as deployment configuration so the notifications-job workflow can reuse the established Cloud Monitoring route without crossing the secret boundary. Co-Authored-By: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This closes the actionable follow-ups from #11844 and #11866 without reopening their settled conclusions:
Failure-Class: none
Issue 1 — materialization data gets a forcing function
Chosen
The existing report is now a reusable production module as well as an operator CLI. The hourly
notifications-jobcalls it off the event loop; it does no Firestore work except during the fixed Monday 14:00 UTC slot. The classification remains the one established in #11866:deliveredis acknowledged,ready/pending_kernel_receiptolder than 48 hours is dropped, younger rows are in flight, and malformed undated rows are separate.Every due run emits one content-free aggregate verdict with
review=true, including a healthy zero-drop verdict. A production notifications-job deploy idempotently creates or updates a Cloud Logging metric and a Cloud Monitoring policy routed to the repository's existingSYNC_BACKFILL_ALERT_NOTIFICATION_CHANNELScontract; it fails the deploy if the channel list is empty or the resulting policy has no channel. This is intentionally a decision-review signal rather than only a failure alarm: a 0% result must reach a human too, otherwise the deferred server-materialization decision can still disappear into silence. Durable drops and monitor failures log at error; full source and block-type breakdowns remain in the explicit CLI rather than becoming dynamic log labels.This is the long-term seam I would keep: the already-scheduled notification worker owns a related read-only operational check, the expensive collection-group scan runs weekly rather than hourly, the runtime log is bounded and content-free, and the deploy workflow reconciles the human route instead of assuming somebody created it by hand.
Rejected
prodenvironment has required reviewers and the read-only Firestore credential, so an unattended schedule would stop at environment approval before it could produce the number.The Cloud Monitoring resources were not applied from this branch. The next production notifications-job deployment performs and verifies that reconciliation; local
gcloudproduction inspection was unavailable because the workstation credential could not be refreshed non-interactively.Issue 2 — referents are supplied during extraction
Chosen
The extraction prompt and the structured-output descriptions now carry the same cross-field contract. When the screen supplies a specific person, PR/ticket and repository, thread subject, document, file/branch, or meeting name/time, extraction must copy that wording into the fact statement and evidence and mirror the same strings into
identifiers. When the screen supplies no identifier,identifiersstays empty and the fact describes only supplied context; invention remains forbidden.Both halves are deliberate. The prior director repair showed that schema descriptions and prompt instructions reinforce different parts of structured output, while the recorded 39-screen residual showed the fields were disagreeing. The regression test inspects all three schema fields so a later edit cannot quietly return to a single-field hint.
Fact validity is unchanged and still checks evidence resolution only. The director prompt and
directorStablePromptbytes are unchanged, so the cached director prefix is byte-identical. Extraction does not pass a cache key, so changing its prompt/schema does not invalidate a provider prompt-cache prefix.Rejected
identifiersJsoninto the director remains a proven no-op because accepted identifiers are already substrings of emitted evidence.The committed offline benchmark contract passes, including the two guard-case mappings. I did not claim a new live-model measurement: the isolated local harness had no running container runtime or provider credentials, while the remote-dev launcher explicitly uses production-backed Firebase identity/data. The live
--invokereplay was therefore not run. The focused Swift production/test build did run, and all 29ContextBucketPromptAssemblerTestspassed.Issue 3 — checks must produce honest outcomes
Chosen in this PR
preflight_runner.pynow treatsBlockingIOErrorfromstdout/stderr.flush()as temporary backpressure. On POSIX it waits for the inherited descriptor to become writable and retries the same buffered flush; the portable fallback uses the runner's bounded polling interval, andInterruptedErrorretries immediately. The regression test reproduces the observed Errno 35 twice before success. No gate is skipped, downgraded, or made quieter.Deliberately not changed here: Desktop Swift runner governance
The evidence does not support a workflow code fix for a check that literally never renders. On #11844,
Desktop Swift Static & Test Contractsstarted within seconds and ended after about 66.6 minutes (failed, after merge). On #11866 it waited about 45 minutes for a runner, then completed successfully about 39 minutes later (also after merge). Live branch-protection inspection returnedrequired_status_checks: nullformain.That makes the durable defect repository governance: maintainers can merge before the stable aggregate
Desktop Swift Build & Testshas published a verdict. Changing test commands, splitting the job, or weakening parallelism would not make anyone wait for it and would risk hiding the two suites under investigation. The long-term fix is an external GitHub ruleset/branch-protection change requiring that aggregate check once its current flaky failure class is repaired. Repository settings are not versioned by this PR, so I am explicitly leaving that operation out rather than pretending a workflow edit solves it.Verification completed before the full gates
python3 .github/scripts/test_preflight_runner.py— 25 tests passed, 6 skipped.backend/test.sh— 12 materialization-report tests and 5 notifications-job orchestrator tests passed../scripts/dev-feedback.py --once swift 'ContextBucketPromptAssemblerTests'— 29 tests passed after a full Swift production/test build.desktop/macos/scripts/agent-logic-harness.sh --cross-surface-smoke— Swift and agent cross-surface contracts passed.bash desktop/macos/tests/test-context-bucket-benchmark.sh— 34 fixture contracts and 24 director mappings passed; this is the offline contract, not a live model replay.actionlint .github/workflows/gcp_notifications_job.yml— passed.OMI_PR_BODY_FILE=/tmp/omi-proactive-followup-pr.md make preflight— all 40 checks selected by the current local manifest passed.OMI_PR_BODY_FILE=/tmp/omi-proactive-followup-pr.md bash scripts/pre-push origin < /dev/null— the real, broader pre-push gate exited successfully.cd backend && bash scripts/typecheck.sh— the final strict run completed with 0 errors and 3,667 pre-existing warnings.🤖 Generated with Claude Code