bregctl test: a journey cannot wait for automatic application after submit

オープン
#2,721 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
postgresql, rust

調査の方向性

Start with crates/registry-breg/src/fixtures/proposals.rs for supported journey operations and assertion fields, then read the schema-test runtime in crates/registry-breg/src/fixtures.rs and the journey guide at docs/site/src/content/docs/configure/breg-journeys.mdx. First determine whether the rehearsal starts an application worker; the issue notes this is unconfirmed. Done means a bounded journey wait can observe applicationStatus: applied, read the changed record, report a named timeout diagnostic, and is documented with a runnable product example.

索引モデルが issue の本文から書いたものです。

説明

Problem

An Action whose Proposal has no review and automatic application is applied by the built-in executor after Submit. A journey in tests/journeys.yaml has no way to wait for that application, so it cannot assert what the Action applied. A get step after Submit races the executor, and the journey format has no polling or wait step.

Evidence

All line numbers are on origin/main at 36d25ef652.

  • crates/registry-breg/src/fixtures/proposals.rs:10 to :22: the journey Proposal operations are Start, Get, Edit, Submit, Revise, Rebase, Retry, Cancel, Apply, GetReviewContext and GetReviewStatus. There is no wait, poll or "until" operation.
  • crates/registry-breg/src/fixtures/proposals.rs:187: Proposal steps may assert only state, submissionVersion, effectDigest and applicationStatus. Any other field is refused as JourneyShapeRefused.
  • rg -i "poll|sleep|wait|eventually|until" over crates/registry-breg/src/fixtures.rs, crates/registry-breg/src/fixtures/ and docs/site/src/content/docs/configure/breg-journeys.mdx finds no wait semantics.
  • crates/registry-breg/src/fixtures.rs:3837 to :3840: the schema-test runtime says no review worker runs in the rehearsal. I found no application worker started there either, but I did not run a journey to confirm that a Submit leaves applicationStatus queued.
  • docs/site/src/content/docs/configure/breg-proposals.mdx:402: automatic application is performed by the built-in executor after approval.
  • docs/site/src/content/docs/configure/breg-journeys.mdx:122 to :126: the page describes the bregctl test run and does not mention automatic application.

Proposed change

Pick the simplest of these and record the choice:

  1. Run the application executor in the schema-test runtime and add a bounded wait expectation on a Get step (for example expect: {applicationStatus: applied} with a step timeout), so the journey can then get the changed record.
  2. Or apply synchronously inside the rehearsal for automatic Actions, so the response to Submit already carries applicationStatus: applied.

Option 2 is smaller but tests a different path from production. Option 1 keeps the production path.

Acceptance

  • A journey can start and submit a review-free Proposal, then assert applicationStatus: applied and read the changed record.
  • The wait is bounded and fails with a named diagnostic on timeout.
  • The journeys page documents the behaviour with a runnable example, and the example journey for such an Action is added to a product example.

Not included

The second half of the original request, that a failed schema test leaves no receipt and the single-use test database costs a fresh database per retry, is not drafted. The code does say "recreate the disposable database before retrying" for execution and database errors (crates/registry-bregctl/src/lib.rs:6858, :6882, :6896), and bregctl dev rebuilds the database on each run (crates/registry-bregctl/src/dev/mod.rs:2869). I could not confirm that a rerun on a used database is refused, because the candidate checks (crates/registry-breg/src/fixtures.rs:5722 to :5742) compare the registry state, not prior journey data. It needs a real run against PostgreSQL.

主要言語
Rust
スター
2
フォーク
0
平均マージ
9時間 48分
マージ済み PR(30日)
151

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

registrystack/registry-stack のほかの issue

registrystack/registry-stack の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。