Project analysis
Project analysis consumes request IDs after terminal build analysis has retained all final build issues. A missing terminal-analysis completion is an invalid handoff, not a reason to poll.
The controller materializes both directions of each issue/project association and records attribution completion before resolving project statuses and recording their facts and lookup entries. Each step retains its own event after its writes. Once both steps finish, the controller records project_analysis_completed, updates the request-summary completion timestamp, publishes project.analysis.completed, and queues repository recording. Project-fact and attribution events do not set that timestamp; attribution queries still require the successful attribution event.
Only terminal build analysis that confirms complete validation runs the attribution and status providers. Incomplete or unknown coverage skips both providers and their result events, but still completes project analysis and queues repository recording.
Retries adopt immutable facts and repair missing lookup entries. A completed request skips provider calls, repairs its summary if needed, and retries hook publication followed by the recording handoff. Empty results still record completion. Cancelled requests bypass project analysis; superseded requests require no work.
Result metrics
Metrics under request_log_materializer.project_analysis use the processing
context's queue tag:
| Metric |
Type |
Value |
project_results |
Counter |
Project observations, tagged status=green or status=broken |
requests_with_broken_projects |
Counter |
Requests recording at least one broken project |
project_results_per_request |
Histogram |
Number of recorded project results |
broken_projects_per_request |
Histogram |
Number of recorded broken results |
broken_project_fraction_per_request |
Histogram |
Broken results divided by total results; omitted for an empty result set |
These describe each request's recorded results, not distinct currently broken
projects or a guaranteed full changed-project inventory. Successful empty results
contribute zero to the count histograms; skipped validation contributes no samples.
Fraction buckets range from 0 to 1, with finer bands below 1% broken.
Count buckets range from 0 to 50,000 with overflow.
Observations follow the first successful creation of the project-facts event.
Retries and summary repairs do not repeat them. Metrics are best-effort: a crash
or ambiguous storage response between persistence and emission can lose samples.
Completion hook
The project.analysis.completed payload contains only queue and request_id. Consumers resolve project counts from the request summary and project details from the retained facts and associations. Completion is published even when no projects are affected or incomplete validation skips project results. Cancelled, superseded, abandoned, and unfinished project analyses do not publish this hook.
Publication follows the durable completion log and its summary projection, and precedes the recording handoff. The event ID hashes the queue/request identity and the timestamp comes from the retained completion log. A failed publication is retried without calling providers again. Delivery is at least once; consumers performing external side effects must durably deduplicate by event ID.
Recovery
DLQ recovery leaves existing facts and association rows untouched. If project_analysis_completed was already recorded, it repairs the summary. Otherwise it records project_analysis_abandoned, without calling either provider or marking attribution complete. Recovery never publishes hooks or queues repository recording. If normal publication exhausts retries, the completion notification may be lost. History and summary repairs are safe to retry.
Normal redeliveries also recognize abandonment, repair its summary, and stop. An already-running delivery may still finish immutable writes; abandonment does not roll them back or make a partial association set complete.