Skip to content

Tags

Tags

v0.3.0-20261115002957-4fe09cb30359

Toggle v0.3.0-20261115002957-4fe09cb30359's commit message
refactor(dlq): keep start identity decoding private

Summary:
Move the start-payload identity helper next to its dedicated DLQ controller and make it private. Keep UnmarshalLandRequest and all identity and wire validation behavior unchanged. Update the existing same-package test reference and the Start DLQ wiring example.

Test Plan:
Existing DLQ Start reconciliation, malformed-payload, and retry tests cover the unchanged behavior. Five focused controller/contract/pipeline test targets, the DLQ build target, formatting, lint, and BUILD synchronization checks pass.

Revert Plan:
Revert this commit.

v0.3.0-20261115002358-f12da8c51663

Toggle v0.3.0-20261115002358-f12da8c51663's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(orchestrator): stop dependency-analysis DLQ failing requests a li…

…ve batch owns (#876)

## Summary

### Why?

The batch stage mints a batch per delivery, so a lost ack leaves two
batches for one request, and dependency analysis is where one of them is
chosen. Its DLQ reused the generic batch reconciler, which fails every
member request. A dead-lettered duplicate therefore wrote `Error` over a
request whose chosen batch was still live; that batch went on to land
the change while the request stayed reported as failed. The same
reconciler would also fail a batch that speculate had already admitted,
racing land.

### What?

- Add `NewDLQDependencyAnalysisController`, which decides by the batch's
state:
- `Creating` with a request already carried by another batch past
`Creating`: a duplicate, left inert (same test the primary controller
uses to abandon it).
- `Creating` otherwise, `Created`, or `Failed`: the batch owns its
requests and nothing downstream will advance it, so it is failed and
fanned out as before.
  - Any later state: a downstream stage owns it; acked untouched.
- Wire it as the dependency-analysis stage's DLQ and update the DLQ
README's controller mapping (which also still listed `speculate` under
the generic controller).

## Test Plan

✅ `bazel test //submitqueue/orchestrator/...` (new table-driven DLQ test
covers every batch state, duplicate vs owner, and lookup failure)
✅ `make lint-fmt`, `make check-gazelle`
`TestConflictAnalyzerFailure_ReconcilesFromDLQ` (e2e) exercises the
owner path and should still see the batch `Failed` and the request
`Error`.


## Stack
1. #875
1. @ #876


🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

v0.3.0-20261115000938-24d8c57fb84c

Toggle v0.3.0-20261115000938-24d8c57fb84c's commit message
fix(start): report failed starts when no request was saved

**TL;DR:** Report failed submissions as Error even when no Request was saved.

## Summary
The start DLQ reports failures that occurred before a Request was saved by publishing an Error request log with request version 0. Saved Requests retain batch ownership, terminal winners and observed-version conditional writes. The DLQ publishes no normal-work command.

## Repro
1. Accept a valid submission, but let its initial Request save fail until the message reaches `start_dlq`.
2. Process the dead letter while the Request is absent.
3. An Error request log with version 0 reports the failed submission.

## Test Plan
- Existing DLQ tests cover version-zero failure logs for missing Requests, repeated delivery and publication failures, identity validation, saved-row ownership, terminal and conditional-write behavior, and error counting on every failed delivery.
- The messagequeue, primary Start, orchestrator and DLQ unit-test targets passed uncached. `make lint`, `make check-gazelle` and `make check-tidy` passed.

## Revert Plan
Revert this PR; existing Request data and request-log history remain intact.

## Issue Links
None — repository audit remediation without an external tracker ticket.

v0.3.0-20261114050809-3b94c331e29e

Toggle v0.3.0-20261114050809-3b94c331e29e's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
refactor(changeprovider): Read Phabricator diffs through platform/con…

…duit (#1014)

## Why?
The Phabricator change provider hand-rolls its Conduit call: flat
`ids[]=` fields in the URL query, its own envelope type, Conduit errors
as plain strings, and a token transport in the orchestrator wiring.
Moving it onto `platform/conduit` makes it the first consumer of the
shared client.
 
## What?
- `Params.HTTPClient` becomes `Params.Conduit *conduit.Client`.
`differential.querydiffs` is now one `Call` with `{"ids": [...]}`, and a
diff missing from the result is still an error.
- A Conduit `error_code` surfaces as `*conduit.Error` instead of a
formatted string; HTTP failures stay `platform/http.StatusError`, so
classification is unchanged.
- The orchestrator wiring builds the client in `conduitClient`, next to
`githubClient`, and drops `apiTokenTransport`.
- `platform/README.md` describes the protocol, endpoint and wiring
layers that GitHub and Phabricator callers share.
 
## Test Plan
`bazel test //submitqueue/extension/changeprovider/phabricator/...
//service/submitqueue/orchestrator/server/...`
 
## Issue
<!-- 
Link the issue here. 
- Use 'Closes #123' if this is the final fix. 
- Use 'Part of #123' or just '#123' if the feature is still in progress.
-->

v0.3.0-20261114044701-b391ec0f0158

Toggle v0.3.0-20261114044701-b391ec0f0158's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(platform): Add platform/conduit Conduit client (#1013)

## Why?
SubmitQueue reads Phabricator through Conduit from more than one place,
and each caller encodes requests, authenticates and parses Conduit's
result envelope its own way. A shared client gives them one encoding,
one auth placement and one error shape, and gives the planned
Phabricator support in the Runway merger a client from day one.
 
## What?
- New `platform/conduit`: `NewClient(httpClient, token)` and `Call(ctx,
method, params, result)`.
- Sends `params` as JSON with the token in `__conduit__`. Conduit
ignores `api.token` once the parameters are JSON, so the token lives on
the client rather than in a transport.
- A non-200 reply is a `platform/http.StatusError`. A Conduit
`error_code` is a typed `*conduit.Error`; Conduit returns those with
HTTP 200, a rejected token (`ERR-INVALID-SESSION`) included.
- A null result or an empty array (PHP's empty map) leaves the caller's
result untouched.
- No per-method wrappers: typed requests and results stay with each
caller.
- The encoding and auth placement were checked against a production
Phabricator for `differential.querydiffs`,
`differential.revision.search` and `differential.getcommitmessage`.
 
## Test Plan
`bazel test //platform/conduit/...`

## Issue
<!-- 
Link the issue here. 
- Use 'Closes #123' if this is the final fix. 
- Use 'Part of #123' or just '#123' if the feature is still in progress.
-->

v0.3.0-20261114021203-db69357f5e10

Toggle v0.3.0-20261114021203-db69357f5e10's commit message
fix(submitqueue): repair terminal request status on retry

v0.3.0-20261114014647-edd1dfb2f97f

Toggle v0.3.0-20261114014647-edd1dfb2f97f's commit message
docs: scope the DLQ ownership statement to request reconciliation

Summary:
Describe downstream batch-ownership preservation on the generic request DLQ path without implying that every DLQ handler uses its guard.

Test Plan:
Statically traced the generic request and conflict-signal DLQ paths through their terminal helper. Verified the changed paragraph retains the no-restart and terminal-winner statements and both links resolve; git diff --check passes. make gazelle produced no BUILD changes. No runtime tests were run for this documentation-only correction.

Revert Plan:
Revert this documentation commit.

v0.3.0-20261113221152-fae45e4ee6c7

Toggle v0.3.0-20261113221152-fae45e4ee6c7's commit message
fix(gateway): recover dead-lettered request logs

Intent:
Recover retained request logs after primary delivery retries stop.

Changes:
Read log_dlq with unlimited retries through the existing controller and materializer.
Pair primary and recovery reader startup and shutdown cleanup.
Preserve existing diagnostics, message handling, and operator guidance.

Test Plan:
Existing gateway server, log controller, materializer, and lifecycle unit tests.
Existing gateway log integration test and formatting, lint, and dependency checks.

Revert Plan:
Revert this change and retain the log_dlq backlog.

v0.3.0-20261113215224-7c39c99825bb

Toggle v0.3.0-20261113215224-7c39c99825bb's commit message
fix(queue): log lease ticks at debug

Summary:
Routine lease ticks no longer clutter default INFO logs.

Intent:
- Keep recurring lease-maintenance summaries available for debugging.

Changes:
- Downgrade only the lease-tick summary to DEBUG and adjust its two existing test observers.
- Preserve log fields, timing, lease operations, transition/error logs, and metrics.

Test Plan:
- Existing ownership-summary and renewal-error tests capture DEBUG summaries.
- ./tool/bazel test //platform/extension/messagequeue/mysql:go_default_test --test_output=errors --nocache_test_results --runs_per_test=3 (passed).
- ./tool/bazel build //service/submitqueue/orchestrator/server:orchestrator (passed).
- make gazelle && make check-gazelle && make lint (passed).

Revert Plan:
Revert this PR.

v0.3.0-20261113212310-f9b8dc2a8517

Toggle v0.3.0-20261113212310-f9b8dc2a8517's commit message
fix(speculation): exhaust cancelled viable paths

Count a provider-cancelled path as an exhausted attempt once dependencies
settle and every remaining viable path has failed or been cancelled. Keep
the recorded Cancelled outcome, usable alternatives and user cancellation
semantics unchanged.

Validation: uncached speculation, sticky allocator and build-signal unit
targets, orchestrator build, formatting, lint, tidy and Gazelle checks.