Repository navigation
fix(update,engine,server): failed release notes, lost catalog controls, logged causes, and a cleanup pass - #308
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 05fe6f1 | Commit Preview URL Branch Preview URL |
Nov 14 2026, 06:08 AM |
…ttled
A release-notes fetch that fails is logged with its cause and gets its own
section ("the Count could not read these release notes this run") instead of
"source repository could not be resolved". A body with a failed fetch carries
a content marker no intent computes, so the next run fetches again instead of
reusing it as settled.
`automerge::merged`, the server's public-page reader of the auto-merge
history, returns cache errors and filters on the actor, as the inventory's
reader does; the two are one function now. The server logs a read failure.
Cleanups in the crate:
- delete the cutover oracles: `pr/view/oracle.rs` (its fail-closed
admission tests move to `pr/view/tests.rs`), the legacy inventory document,
`read_legacy_inventory` and the `Documents` indirection; the inventory
tests compare the unfiltered and filtered reads and assert counts directly
- the frozen-bytes test calls `branch_identity` for the identity and branch
- drop the dashboard receipt read `reconcile` never used
- shared helpers: published-status checks, the open PR on a plan's branch,
the GraphQL pull projection, the compare read and ownership constants,
`is_key`, one repository scope constructor, `with_digest`, the batch label,
the lockfile-pending wording, `Plan::new` as the base literal, `Plan::hold`
through `keep`, one held-target pass in `Controls::apply`, `restore_closed`
- `one()` returns a `MergeNote`; `requested` is gone
- one code-span helper (`text::code`); `truncate` is `cut_bytes`
- named body budgets, closed-PR chunk and page sizes, head retries, write
parallelism and refs per update
- `PlanError::MissingBase` merges into `MissingExtractionCommit`
- `tooling` uses a named `Unknown` instead of `Result<_, ()>`
- test fixtures `action` and `change` in `plan::testing`; unused
`contents_mut`/`deleted_mut` removed
- comments state the present rule instead of narrating history
`save_catalog_controls` saved an empty set when planning failed, which un-retried every ticked box on the next run. It now logs the plan error and keeps the saved controls. Cleanups in the crate: - one repository validator (`patchula_config::settings::valid_repo`) and one concurrency check against `MAX_CONCURRENCY`, which the CLI uses too - shared `extract_files`, `Work::from_extraction`, `credential_scope`, `held_targets`, the no-config reason, the Git tree mode constants and `mark_sent` - `report.rs` reads the catalog and the resolved version once, compiles `security.quietImages` once per repository, and shares the security label and notice construction - `lookup.rs` indexes catalogs by package once and shares the reused-tags predicate - the catalog reuse window is computed once per key; milliseconds per hour are named - the token and transport constructors are behind a `testing` feature - `installation_repositories` and `repo_report` are public for the server - `write.rs` reads the dry run off the absent inventory - tests read stored write receipts through `patchula_update::stored_receipts` - comments state the present rule instead of narrating history The state table's rows are rehashed for the source changes; no stored state changes meaning.
A batch whose engine run failed, and a remote run that failed, now log the
engine error before the stand-in report or the generic remote message. Server
errors carry their cause, so startup and IO failures say why ("invalid GitHub
App credentials: …").
Cleanups in the crate:
- the webhook payload's `pull_request` is a typed `model::PullRequest`;
redundant `#[serde(default)]` and the test-only `Payload::parse` are gone
- one installation-client helper; a remote run that cannot build one logs
why its public record is skipped
- installation discovery uses the engine's listing; the batch error report
uses `repo_report`
- batches use `SlotGuard`, as remote runs do; `discard_on_panic` is gone
- the public API's rejection body is `RejectBody`; open PRs decode once
without a clone
- one bot-login comparison (case-insensitive) and shared installation
checks in the webhook classifier
- the startup contention test drops its sleep; `MAX_JOBS` counts running
jobs too
- `fail`/`usage` helpers with named exit codes replace hand-built tuples; one engine-error mapping and one `PATCHULA_RECHECK` message - the concurrency check is the engine's - `source` no longer filters remote flags twice - the TUI wraps with `textwrap` - the git runners share `git_command`; tests share `copier::test_git` - tests read stored write receipts through `patchula_update::stored_receipts`
…eceipt settles it
A release-notes fetch that fails is classified by the notes error's kind:
the network, a timeout, a server error or a rate limit may pass on a later
run; a registry 404, an unsafe name, a Go vanity host without go-get
metadata or an upstream answer the notes cannot use fails the same way every
run. Only the transient class gets the "could not read … this run" section
and the unsettled content marker; a lasting failure renders as before
("source repository could not be resolved") and settles.
A body with a transient failure no longer settles through write receipts:
`save_receipts` keeps no receipt for its branch, so the next run is not
restored from one and renders the body, and fetches the notes, again. The
receipt-path test fails the fetch on run 1 and checks run 2 fetches again.
A plan error keeps the plan-derived controls the last run saved and still records the package files' held-back targets, instead of skipping the whole save.
Over every one-PR history and a spread of two-PR histories, with and without a bring-back tick, admit decides the same whether the other heads are unanswered, answered in full or unread.
A parked-runtime barrier (paused clock on the current-thread runtime) replaces the sleep: no delivery is acknowledged while its write is locked out; one that gives up on the lock answers 503 and its redelivery is accepted.
sweepies
force-pushed
the
refactor/sloppy-update-engine
branch
from
November 14, 2026 05:47
c4ab4e5 to
3198031
Compare
…eeps a resolved source The classifier now lists the lasting conditions and keeps everything else unsettled: an unsafe package name or a tool name mise's policy refuses, a package or release the upstream does not know (`NotFound`), `Upstream` and `Source(Invalid)`. The network, rate limits, `Auth`, `Parse` and every local fault (the cache, a missing tool store, GraphQL or pagination errors) may pass, so their bodies stay unsettled and keep no receipt. A memoised failure keeps only its kind, so of those only `NotFound` reads as lasting. A lasting failure after the source repository resolved keeps the source: the section says the notes could not be read and links upstream, settled. "Source repository could not be resolved" is left for a source that was never found. The guide describes both classes, the resolved-source wording, and that a host that no longer resolves retries its notes every run.
A head closed_reads does not name already reads as Unread, so filling the other heads as unread could never differ; the comparison against heads answered in full stays.
…lock Under the workspace's `patchula-cache/paused-clock` feature every cache call runs in `spawn_blocking`, so a paused clock cannot auto-advance and the old barrier waited out SQLite's busy timeout; every delivery answered 503 and the contention path never ran. The resolver now logs, at debug, the installation mapping write it is about to make, and the test waits for that event through a tracing layer: one delivery is then writing against the locked database and the others wait on its single-flight lookup. None may have answered, and after the commit every delivery is accepted, with one shared lookup.
Merged
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.
A cleanup pass over code written during the refactor, covering
crates/update,crates/engine,crates/serverandcrates/cli. The commits are by crate area, because the fixes use helpers from the cleanups.Behaviour fixes
guide/release-notes.md.automerge::mergedreturns cache errors and filters on the actor, the same asload_history(they are now one function).<!--inside a PR-body code span is escaped with a zero-width space. The previous<showed literally in code spans.Cleanup (no behaviour change)
pr/view/oracle.rsand the legacy inventory query. Their fail-closed admission tests moved topr/view/tests.rs, and the inventory tests compare the filtered and unfiltered reads directly. The frozen-bytes test now calls the realbranch_identity.update:is_published, the open PR on a plan's branch, onePlan::newbase, the hold-ranking rule, the scope constructor, the compare read, and theWEB_FLOW/ZERO_OIDconstants;engine: the extraction and work builders, the credential scope, held-target expansion, one repository validator (valid_repo), and one concurrency check againstMAX_CONCURRENCY;server: the installation client builder and a single slot guard; installation discovery shares the engine's listing;cli: the exit-code helpers and one git command builder.Value.testingfeature.stored_receiptsreplaces three copies of the receipt state in tests.admitconsults only the closed reads it selects, which is what the deleted oracle guarded.Notes
planignores the committed-credentials refusal that the engine's local scan honours.