test(bdd): add direct test for _fast_init_or_upgrade early-return behavior #1156

Merged
CoreRasurae merged 1 commit from test/m3-fast-init-early-return into master 2026-04-01 23:14:58 +00:00
Member

Summary

Adds direct BDD coverage for the _fast_init_or_upgrade closure installed by the template-DB patch so the early-return behavior is explicitly verified instead of only being inferred from broader CLI scenarios. This protects the anti-hang behavior for parallel test execution by asserting when migration delegation must be skipped versus executed.

Changes

  • Added features/fast_init_upgrade.feature with five @mock_only scenarios that cover all relevant paths:
    • non-empty SQLite DB with matching prefix skips original migration,
    • non-existent matching-prefix DB copies from template,
    • non-matching SQLite prefix delegates to original migration,
    • in-memory SQLite delegates to original migration,
    • non-SQLite URL delegates to original migration.
  • Added features/steps/fast_init_upgrade_steps.py with step definitions that set up each DB/url case, invoke MigrationRunner.init_or_upgrade, and assert both call behavior and file outcomes.
  • Added features/mocks/fast_init_test_helpers.py with patch_original_init_or_upgrade() to patch the closure-captured _original_init_or_upgrade reference for deterministic call tracking during BDD execution.

Testing

  • New BDD scenarios directly exercise _fast_init_or_upgrade behavior under the same patching mechanism used at runtime.
  • Assertions validate both control-flow expectations (called vs not called) and file-level effects (unchanged content/template copy).

Closes #733

Forgejo dependency direction is set as required: this PR blocks #733, and issue #733 depends on this PR.

Implementation Notes

The helper uses closure-cell replacement of _original_init_or_upgrade to avoid recreating or re-implementing the function under test, keeping the tests focused on real production control flow while remaining isolated and deterministic.

## Summary Adds direct BDD coverage for the `_fast_init_or_upgrade` closure installed by the template-DB patch so the early-return behavior is explicitly verified instead of only being inferred from broader CLI scenarios. This protects the anti-hang behavior for parallel test execution by asserting when migration delegation must be skipped versus executed. ## Changes - Added `features/fast_init_upgrade.feature` with five `@mock_only` scenarios that cover all relevant paths: - non-empty SQLite DB with matching prefix skips original migration, - non-existent matching-prefix DB copies from template, - non-matching SQLite prefix delegates to original migration, - in-memory SQLite delegates to original migration, - non-SQLite URL delegates to original migration. - Added `features/steps/fast_init_upgrade_steps.py` with step definitions that set up each DB/url case, invoke `MigrationRunner.init_or_upgrade`, and assert both call behavior and file outcomes. - Added `features/mocks/fast_init_test_helpers.py` with `patch_original_init_or_upgrade()` to patch the closure-captured `_original_init_or_upgrade` reference for deterministic call tracking during BDD execution. ## Testing - New BDD scenarios directly exercise `_fast_init_or_upgrade` behavior under the same patching mechanism used at runtime. - Assertions validate both control-flow expectations (called vs not called) and file-level effects (unchanged content/template copy). ## Related Issues Closes #733 ## Dependency Link Forgejo dependency direction is set as required: this PR **blocks** #733, and issue #733 **depends on** this PR. ## Implementation Notes The helper uses closure-cell replacement of `_original_init_or_upgrade` to avoid recreating or re-implementing the function under test, keeping the tests focused on real production control flow while remaining isolated and deterministic.
CoreRasurae added this to the v3.2.0 milestone 2026-03-25 00:44:22 +00:00
Author
Member

Scoped Code Review Report (Issue #733)

I reviewed the latest local commit by Luis Mendes:

  • 1b1dc3a1e52dbae56d76f812a75e811a0281918f
  • Branch: test/m3-fast-init-early-return
  • PR: #1156

Scope enforced

Per request, the review scope was limited to:

  • Changed files in this branch:
    • features/fast_init_upgrade.feature
    • features/steps/fast_init_upgrade_steps.py
    • features/mocks/fast_init_test_helpers.py
  • Close surrounding code only:
    • features/environment.py (_install_template_db_patch, _fast_init_or_upgrade)
    • src/cleveragents/infrastructure/database/migration_runner.py (init_or_upgrade)
  • Requirements cross-check:
    • Forgejo issue #733 acceptance criteria
    • docs/specification.md testing architecture sections

Iterative review cycles performed

I repeated full-category passes until no new issue types appeared.

Cycle 1 (correctness/coverage/security/perf):

  • Static diff + behavior mapping against #733 and surrounding fast-init patch logic.
  • Initial issues found (listed below).

Cycle 2 (execution/type/lint + parallel behavior):

  • Ran:
    • nox -s unit_tests -- features/fast_init_upgrade.feature --processes 1
    • nox -s unit_tests -- features/fast_init_upgrade.feature --processes 4
    • nox -s typecheck
    • nox -s lint
  • Both sequential and parallel targeted runs passed.
  • No new issue categories beyond Cycle 1.

Cycle 3 (targeted security pass):

  • Focused scan for temp-file, race, suppression, and test isolation risks.
  • Confirmed prior findings; no additional findings.

Findings (ordered by severity, then category)

Medium

1) Security / Test Reliability — insecure temp path creation (TOCTOU)

  • Location: features/steps/fast_init_upgrade_steps.py:103
  • Issue: tempfile.mktemp(...) is used to generate a non-existent DB path.
  • Why it matters: mktemp is deprecated/insecure due race-window behavior. Another process can claim that path before use, causing flaky behavior in parallel CI and creating potential symlink/path-hijack risk on shared runners.
  • Recommendation: Replace with a race-safe approach, e.g. mkstemp + close/unlink before use, or allocate path inside a TemporaryDirectory.

Low

2) Test Coverage Gap — missing explicit scenario for existing empty DB file path

  • Surrounding behavior reference: features/environment.py:474
  • Current coverage: tests validate:
    • non-empty existing DB -> early return,
    • non-existent DB -> template copy,
    • fallback delegation paths.
  • Gap: no scenario explicitly covers existing 0-byte DB with matching prefix, which is a distinct branch condition mentioned in fast-init logic comments (SQLite empty-file behavior).
  • Why it matters: regression in this branch could slip through while current scenarios still pass.
  • Recommendation: add one @mock_only scenario asserting existing empty DB triggers template copy and does not call original migration.

3) Type-Safety Policy Drift — inline type suppression in new helper

  • Location: features/mocks/fast_init_test_helpers.py:90, features/mocks/fast_init_test_helpers.py:94
  • Issue: uses # type: ignore[attr-defined] on cell.cell_contents assignment.
  • Why it matters: contribution guidelines call out avoiding inline type-suppression. Even when runtime-safe, suppressions can hide future typing regressions.
  • Recommendation: remove suppression by narrowing via local Any cast/helper abstraction and keep pyright strict without ignores.

Overall assessment

  • The PR successfully addresses the core #733 goal and the targeted scenarios execute in both sequential and parallel runs.
  • No high/critical production-runtime, performance, or direct data-security issues were found in scoped code.
  • Please address the medium + low items above before final approval.
## Scoped Code Review Report (Issue #733) I reviewed the **latest local commit by Luis Mendes**: - `1b1dc3a1e52dbae56d76f812a75e811a0281918f` - Branch: `test/m3-fast-init-early-return` - PR: #1156 ### Scope enforced Per request, the review scope was limited to: - Changed files in this branch: - `features/fast_init_upgrade.feature` - `features/steps/fast_init_upgrade_steps.py` - `features/mocks/fast_init_test_helpers.py` - Close surrounding code only: - `features/environment.py` (`_install_template_db_patch`, `_fast_init_or_upgrade`) - `src/cleveragents/infrastructure/database/migration_runner.py` (`init_or_upgrade`) - Requirements cross-check: - Forgejo issue #733 acceptance criteria - `docs/specification.md` testing architecture sections ### Iterative review cycles performed I repeated full-category passes until no new issue types appeared. **Cycle 1 (correctness/coverage/security/perf):** - Static diff + behavior mapping against #733 and surrounding fast-init patch logic. - Initial issues found (listed below). **Cycle 2 (execution/type/lint + parallel behavior):** - Ran: - `nox -s unit_tests -- features/fast_init_upgrade.feature --processes 1` - `nox -s unit_tests -- features/fast_init_upgrade.feature --processes 4` - `nox -s typecheck` - `nox -s lint` - Both sequential and parallel targeted runs passed. - No new issue categories beyond Cycle 1. **Cycle 3 (targeted security pass):** - Focused scan for temp-file, race, suppression, and test isolation risks. - Confirmed prior findings; no additional findings. --- ## Findings (ordered by severity, then category) ### Medium #### 1) Security / Test Reliability — insecure temp path creation (TOCTOU) - **Location:** `features/steps/fast_init_upgrade_steps.py:103` - **Issue:** `tempfile.mktemp(...)` is used to generate a non-existent DB path. - **Why it matters:** `mktemp` is deprecated/insecure due race-window behavior. Another process can claim that path before use, causing flaky behavior in parallel CI and creating potential symlink/path-hijack risk on shared runners. - **Recommendation:** Replace with a race-safe approach, e.g. `mkstemp` + close/unlink before use, or allocate path inside a `TemporaryDirectory`. ### Low #### 2) Test Coverage Gap — missing explicit scenario for existing empty DB file path - **Surrounding behavior reference:** `features/environment.py:474` - **Current coverage:** tests validate: - non-empty existing DB -> early return, - non-existent DB -> template copy, - fallback delegation paths. - **Gap:** no scenario explicitly covers **existing 0-byte DB** with matching prefix, which is a distinct branch condition mentioned in fast-init logic comments (SQLite empty-file behavior). - **Why it matters:** regression in this branch could slip through while current scenarios still pass. - **Recommendation:** add one `@mock_only` scenario asserting existing empty DB triggers template copy and does not call original migration. #### 3) Type-Safety Policy Drift — inline type suppression in new helper - **Location:** `features/mocks/fast_init_test_helpers.py:90`, `features/mocks/fast_init_test_helpers.py:94` - **Issue:** uses `# type: ignore[attr-defined]` on `cell.cell_contents` assignment. - **Why it matters:** contribution guidelines call out avoiding inline type-suppression. Even when runtime-safe, suppressions can hide future typing regressions. - **Recommendation:** remove suppression by narrowing via local `Any` cast/helper abstraction and keep pyright strict without ignores. --- ## Overall assessment - The PR successfully addresses the core #733 goal and the targeted scenarios execute in both sequential and parallel runs. - No high/critical production-runtime, performance, or direct data-security issues were found in scoped code. - Please address the medium + low items above before final approval.
Author
Member

Follow-up on the scoped review findings for #1156 / issue #733:

Applied all valid fixes on branch test/m3-fast-init-early-return:

  1. Security/reliability fix

    • Replaced insecure temp-path generation (tempfile.mktemp) with a race-safe approach using tempfile.mkdtemp + deterministic filename in a private temp directory.
    • Added explicit directory cleanup handler.
  2. Coverage fix

    • Added a new BDD scenario for the existing empty DB file branch (matching prefix) to verify template-copy behavior and non-invocation of the original migration runner.
  3. Type-safety cleanup

    • Removed inline # type: ignore suppression from closure-cell patch helper by using local Any narrowing on the cell reference.

Validation run (with TEST_PROCESSES=9 as required):

  • nox -s unit_tests -- features/fast_init_upgrade.feature --processes 1
  • nox -s unit_tests -- features/fast_init_upgrade.feature --processes 9
  • nox -s lint
  • nox -s typecheck

No additional invalid/contradictory fixes were identified against issue #733 or docs/specification.md for this scoped branch work.

Follow-up on the scoped review findings for #1156 / issue #733: Applied all valid fixes on branch `test/m3-fast-init-early-return`: 1. **Security/reliability fix** - Replaced insecure temp-path generation (`tempfile.mktemp`) with a race-safe approach using `tempfile.mkdtemp` + deterministic filename in a private temp directory. - Added explicit directory cleanup handler. 2. **Coverage fix** - Added a new BDD scenario for the **existing empty DB file** branch (matching prefix) to verify template-copy behavior and non-invocation of the original migration runner. 3. **Type-safety cleanup** - Removed inline `# type: ignore` suppression from closure-cell patch helper by using local `Any` narrowing on the cell reference. Validation run (with `TEST_PROCESSES=9` as required): - `nox -s unit_tests -- features/fast_init_upgrade.feature --processes 1` ✅ - `nox -s unit_tests -- features/fast_init_upgrade.feature --processes 9` ✅ - `nox -s lint` ✅ - `nox -s typecheck` ✅ No additional invalid/contradictory fixes were identified against issue #733 or `docs/specification.md` for this scoped branch work.
CoreRasurae force-pushed test/m3-fast-init-early-return from 1b1dc3a1e5
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Failing after 39s
CI / lint (pull_request) Successful in 3m24s
CI / quality (pull_request) Successful in 4m17s
CI / typecheck (pull_request) Successful in 4m21s
CI / security (pull_request) Successful in 4m28s
CI / integration_tests (pull_request) Successful in 7m17s
CI / unit_tests (pull_request) Successful in 7m38s
CI / docker (pull_request) Successful in 1m2s
CI / e2e_tests (pull_request) Successful in 9m58s
CI / benchmark-regression (pull_request) Failing after 56m1s
CI / coverage (pull_request) Failing after 56m1s
CI / status-check (pull_request) Has been cancelled
to a52b54b4ca
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 18s
CI / unit_tests (pull_request) Successful in 3m4s
CI / lint (pull_request) Successful in 3m28s
CI / quality (pull_request) Successful in 3m41s
CI / integration_tests (pull_request) Successful in 3m42s
CI / security (pull_request) Successful in 4m0s
CI / typecheck (pull_request) Successful in 4m15s
CI / e2e_tests (pull_request) Failing after 4m25s
CI / docker (pull_request) Failing after 10m22s
CI / coverage (pull_request) Failing after 10m22s
CI / benchmark-regression (pull_request) Failing after 40m21s
CI / status-check (pull_request) Has been cancelled
2026-03-26 18:59:17 +00:00
Compare
Owner

Code Review Note

Unable to review — the branch test/m3-fast-init-early-return was not found on the remote. Please verify the branch exists and has been pushed.

## Code Review Note **Unable to review** — the branch `test/m3-fast-init-early-return` was not found on the remote. Please verify the branch exists and has been pushed.
freemo approved these changes 2026-03-30 04:23:02 +00:00
Dismissed
freemo left a comment

Review: APPROVED

Thorough testing of _fast_init_or_upgrade closure mechanism. The closure cell manipulation is brittle but necessary and well-documented. 6 BDD scenarios covering non-empty DB skip, template copy, empty DB copy, non-matching prefix fallback, in-memory fallback, and non-SQLite fallback. Mocks correctly placed in features/mocks/.

## Review: APPROVED Thorough testing of `_fast_init_or_upgrade` closure mechanism. The closure cell manipulation is brittle but necessary and well-documented. 6 BDD scenarios covering non-empty DB skip, template copy, empty DB copy, non-matching prefix fallback, in-memory fallback, and non-SQLite fallback. Mocks correctly placed in `features/mocks/`.
CoreRasurae left a comment

Independent Code Review Report -- PR #1156 / Issue #733

Reviewer: automated deep review (4 iterative cycles)
Scope: Code changes in branch test/m3-fast-init-early-return plus close connections to surrounding code (features/environment.py patch logic, migration_runner.py)
Cross-referenced: Issue #733 acceptance criteria, docs/specification.md, prior review (comment #72933)

Methodology

Performed 4 full review cycles across all categories (bugs, test coverage/flaws, security, performance, code quality/documentation). Each cycle re-examined all categories until no new findings emerged. Prior review findings (mktemp insecurity, missing empty-DB scenario, type suppression) were confirmed as already addressed in commit a52b54b.


Findings by Severity

LOW

L1: Test Coverage Gap -- Missing test for sqlite:// bare in-memory URL variant

  • Location: features/fast_init_upgrade.feature (missing scenario)
  • Source reference: features/environment.py:459
  • Issue: The _fast_init_or_upgrade closure checks two in-memory SQLite forms:
    if ":memory:" in db_url or db_url == "sqlite://":
    
    Scenario 5 ("In-memory SQLite delegates") tests sqlite:///:memory: but no scenario tests the sqlite:// variant. This leaves one branch of the disjunction untested.
  • Risk: If the sqlite:// equality check is accidentally removed or altered, no test would catch the regression.
  • Recommendation: Add a 7th scenario with Given a bare sqlite:// URL for fast-init testing that sets context.fast_init_db_url = "sqlite://" and asserts delegation to original.

L2: Test Flaw -- Delegation scenarios don't verify self argument passed to mock

  • Location: features/steps/fast_init_upgrade_steps.py:180-183
  • Issue: The three delegation scenarios (non-matching prefix, in-memory, non-SQLite) assert mock_original.call_count == 1 but never verify the mock was called with the correct arguments. Specifically, they don't check that self (the MigrationRunner instance) was the first positional argument:
    # Current: only checks call count
    context.fast_init_mock_call_count = mock_original.call_count
    
    # Could additionally verify:
    # mock_original.assert_called_once_with(runner)
    
  • Risk: A hypothetical regression where self is lost or substituted in the delegation call _original_init_or_upgrade(self, **kwargs) would pass silently.
  • Recommendation: Store mock_original.call_args on context and add a Then step asserting the runner instance was passed.

L3: Test Flaw -- No verification that kwargs are forwarded in delegation paths

  • Location: features/steps/fast_init_upgrade_steps.py:181
  • Issue: runner.init_or_upgrade() is always called without arguments. The original MigrationRunner.init_or_upgrade accepts require_confirmation: bool and prompt_for_migration: Callable. The _fast_init_or_upgrade closure uses **kwargs to forward these, but no scenario exercises this forwarding:
    # All delegation scenarios call:
    runner.init_or_upgrade()  # no kwargs
    
    # Never tested:
    runner.init_or_upgrade(require_confirmation=True)
    
  • Risk: If **kwargs forwarding breaks (e.g., closure signature changes to drop **kwargs), no test catches it.
  • Recommendation: Add at least one delegation scenario variant that passes a keyword argument and verifies it arrives in the mock's call_args.kwargs.

L4: Documentation -- Commit message claims "5 BDD scenarios" but feature file contains 6

  • Location: Commit a52b54b message body
  • Issue: The commit message explicitly enumerates 5 scenarios and states "Add 5 BDD scenarios". The feature file contains 6 scenarios -- the "Existing empty database with matching prefix copies template" scenario (added as a fix from the prior review cycle) is present in code but not listed in the commit message.
  • Risk: Minor documentation inconsistency that could confuse reviewers relying on the commit message for an accurate summary.

L5: Documentation -- CHANGELOG entry misleading about "replacing" mktemp

  • Location: CHANGELOG.md, unreleased section
  • Issue: The entry states: "Hardened fast-init step temp-path handling by replacing deprecated insecure mktemp usage with private temp-directory allocation."
    However, this diff does not replace any existing mktemp calls. The new code uses mkstemp/mkdtemp from the start. The existing tempfile.mktemp in environment.py:564 (before_scenario) remains untouched. The word "replacing" implies a modification to existing code that didn't occur.
  • Risk: Misleading change history. Note: the actual mktemp replacement is tracked in the separate PR #736.
  • Recommendation: Reword to: "Added direct BDD coverage for _fast_init_or_upgrade [...]. Uses race-safe temp-path allocation (mkstemp/mkdtemp) throughout."

INFO

I1: Code Quality -- Redundant hasattr checks in cleanup helpers

  • Location: features/steps/fast_init_upgrade_steps.py:31,44
  • Issue: Both _register_path_cleanup and _register_directory_cleanup guard with if not hasattr(context, "_cleanup_handlers"). However, before_scenario (environment.py:509) always initializes context._cleanup_handlers = [] before any step runs. The guard is dead code.
  • Risk: None. Defensive coding consistent with patterns in other step files (e.g., repl_coverage_steps.py:99, settings_steps.py:378). Not harmful but technically unreachable.

I2: Thread Safety -- Class-level closure cell replacement without synchronization

  • Location: features/mocks/fast_init_test_helpers.py:91
  • Issue: patch_original_init_or_upgrade() mutates the _original_init_or_upgrade closure cell on the class-level MigrationRunner.init_or_upgrade function. During the with block window, any concurrent thread hitting a fallback path in _fast_init_or_upgrade would invoke the MagicMock instead of the real migration runner, silently skipping migration.
  • Risk: Theoretical only. Behave runs scenarios sequentially within a feature, and @mock_only features skip DB-touching setup. In the current execution model this is safe. However, if multi-threaded test execution is introduced, this would become a subtle concurrency bug.

I3: Portability -- Closure cell manipulation is CPython-specific

  • Location: features/mocks/fast_init_test_helpers.py:87-91
  • Issue: Direct cell_contents read/write on closure cells is a CPython implementation detail documented in the C API but not guaranteed by the Python language specification. This technique would fail on PyPy or GraalPython.
  • Risk: Acceptable for a CPython-targeting test suite. The module docstring documents the mechanism well. Consider adding a brief note that this is CPython-specific if the project ever targets alternative runtimes.

I4: Security Scanner -- Hardcoded credentials in test fixture

  • Location: features/steps/fast_init_upgrade_steps.py:160
  • Issue: "postgresql://user:pass@localhost/testdb" contains cleartext credentials. While obviously a test-only placeholder (no real database is contacted), automated secret scanners (e.g., Gitleaks, Semgrep secrets, GitHub Advanced Security) may flag this as a credential leak.
  • Recommendation: Consider using postgresql://placeholder:placeholder@localhost/testdb or a clearly synthetic pattern that scanners are less likely to flag.

Summary

Severity Count Categories
Critical 0 --
High 0 --
Medium 0 --
Low 5 Test Coverage (1), Test Flaws (2), Documentation (2)
Info 4 Code Quality (1), Thread Safety (1), Portability (1), Security Scanner (1)

Overall assessment: The implementation is solid and correctly addresses all 4 acceptance criteria from issue #733. The prior review findings (mktemp, empty-DB gap, type suppression) were properly resolved. The 6 scenarios cover all meaningful code paths in _fast_init_or_upgrade. The closure-cell mocking approach is creative, well-documented, and appropriate for the testing need. The findings above are refinement-level observations -- none block merge.

## Independent Code Review Report -- PR #1156 / Issue #733 **Reviewer:** automated deep review (4 iterative cycles) **Scope:** Code changes in branch `test/m3-fast-init-early-return` plus close connections to surrounding code (`features/environment.py` patch logic, `migration_runner.py`) **Cross-referenced:** Issue #733 acceptance criteria, `docs/specification.md`, prior review (comment #72933) ### Methodology Performed 4 full review cycles across all categories (bugs, test coverage/flaws, security, performance, code quality/documentation). Each cycle re-examined all categories until no new findings emerged. Prior review findings (mktemp insecurity, missing empty-DB scenario, type suppression) were confirmed as already addressed in commit `a52b54b`. --- ## Findings by Severity ### LOW #### L1: Test Coverage Gap -- Missing test for `sqlite://` bare in-memory URL variant - **Location:** `features/fast_init_upgrade.feature` (missing scenario) - **Source reference:** `features/environment.py:459` - **Issue:** The `_fast_init_or_upgrade` closure checks **two** in-memory SQLite forms: ```python if ":memory:" in db_url or db_url == "sqlite://": ``` Scenario 5 ("In-memory SQLite delegates") tests `sqlite:///:memory:` but no scenario tests the `sqlite://` variant. This leaves one branch of the disjunction untested. - **Risk:** If the `sqlite://` equality check is accidentally removed or altered, no test would catch the regression. - **Recommendation:** Add a 7th scenario with `Given a bare sqlite:// URL for fast-init testing` that sets `context.fast_init_db_url = "sqlite://"` and asserts delegation to original. --- #### L2: Test Flaw -- Delegation scenarios don't verify `self` argument passed to mock - **Location:** `features/steps/fast_init_upgrade_steps.py:180-183` - **Issue:** The three delegation scenarios (non-matching prefix, in-memory, non-SQLite) assert `mock_original.call_count == 1` but never verify the mock was called with the correct arguments. Specifically, they don't check that `self` (the `MigrationRunner` instance) was the first positional argument: ```python # Current: only checks call count context.fast_init_mock_call_count = mock_original.call_count # Could additionally verify: # mock_original.assert_called_once_with(runner) ``` - **Risk:** A hypothetical regression where `self` is lost or substituted in the delegation call `_original_init_or_upgrade(self, **kwargs)` would pass silently. - **Recommendation:** Store `mock_original.call_args` on context and add a Then step asserting the runner instance was passed. --- #### L3: Test Flaw -- No verification that `kwargs` are forwarded in delegation paths - **Location:** `features/steps/fast_init_upgrade_steps.py:181` - **Issue:** `runner.init_or_upgrade()` is always called without arguments. The original `MigrationRunner.init_or_upgrade` accepts `require_confirmation: bool` and `prompt_for_migration: Callable`. The `_fast_init_or_upgrade` closure uses `**kwargs` to forward these, but no scenario exercises this forwarding: ```python # All delegation scenarios call: runner.init_or_upgrade() # no kwargs # Never tested: runner.init_or_upgrade(require_confirmation=True) ``` - **Risk:** If `**kwargs` forwarding breaks (e.g., closure signature changes to drop `**kwargs`), no test catches it. - **Recommendation:** Add at least one delegation scenario variant that passes a keyword argument and verifies it arrives in the mock's `call_args.kwargs`. --- #### L4: Documentation -- Commit message claims "5 BDD scenarios" but feature file contains 6 - **Location:** Commit `a52b54b` message body - **Issue:** The commit message explicitly enumerates 5 scenarios and states "Add 5 BDD scenarios". The feature file contains **6** scenarios -- the "Existing empty database with matching prefix copies template" scenario (added as a fix from the prior review cycle) is present in code but not listed in the commit message. - **Risk:** Minor documentation inconsistency that could confuse reviewers relying on the commit message for an accurate summary. --- #### L5: Documentation -- CHANGELOG entry misleading about "replacing" `mktemp` - **Location:** `CHANGELOG.md`, unreleased section - **Issue:** The entry states: *"Hardened fast-init step temp-path handling by **replacing** deprecated insecure `mktemp` usage with private temp-directory allocation."* However, this diff does not **replace** any existing `mktemp` calls. The new code uses `mkstemp`/`mkdtemp` from the start. The existing `tempfile.mktemp` in `environment.py:564` (`before_scenario`) remains untouched. The word "replacing" implies a modification to existing code that didn't occur. - **Risk:** Misleading change history. Note: the actual `mktemp` replacement is tracked in the separate PR #736. - **Recommendation:** Reword to: *"Added direct BDD coverage for `_fast_init_or_upgrade` [...]. Uses race-safe temp-path allocation (`mkstemp`/`mkdtemp`) throughout."* --- ### INFO #### I1: Code Quality -- Redundant `hasattr` checks in cleanup helpers - **Location:** `features/steps/fast_init_upgrade_steps.py:31,44` - **Issue:** Both `_register_path_cleanup` and `_register_directory_cleanup` guard with `if not hasattr(context, "_cleanup_handlers")`. However, `before_scenario` (`environment.py:509`) **always** initializes `context._cleanup_handlers = []` before any step runs. The guard is dead code. - **Risk:** None. Defensive coding consistent with patterns in other step files (e.g., `repl_coverage_steps.py:99`, `settings_steps.py:378`). Not harmful but technically unreachable. --- #### I2: Thread Safety -- Class-level closure cell replacement without synchronization - **Location:** `features/mocks/fast_init_test_helpers.py:91` - **Issue:** `patch_original_init_or_upgrade()` mutates the `_original_init_or_upgrade` closure cell on the **class-level** `MigrationRunner.init_or_upgrade` function. During the `with` block window, any concurrent thread hitting a fallback path in `_fast_init_or_upgrade` would invoke the `MagicMock` instead of the real migration runner, silently skipping migration. - **Risk:** Theoretical only. Behave runs scenarios sequentially within a feature, and `@mock_only` features skip DB-touching setup. In the current execution model this is safe. However, if multi-threaded test execution is introduced, this would become a subtle concurrency bug. --- #### I3: Portability -- Closure cell manipulation is CPython-specific - **Location:** `features/mocks/fast_init_test_helpers.py:87-91` - **Issue:** Direct `cell_contents` read/write on closure cells is a CPython implementation detail documented in the C API but not guaranteed by the Python language specification. This technique would fail on PyPy or GraalPython. - **Risk:** Acceptable for a CPython-targeting test suite. The module docstring documents the mechanism well. Consider adding a brief note that this is CPython-specific if the project ever targets alternative runtimes. --- #### I4: Security Scanner -- Hardcoded credentials in test fixture - **Location:** `features/steps/fast_init_upgrade_steps.py:160` - **Issue:** `"postgresql://user:pass@localhost/testdb"` contains cleartext credentials. While obviously a test-only placeholder (no real database is contacted), automated secret scanners (e.g., Gitleaks, Semgrep secrets, GitHub Advanced Security) may flag this as a credential leak. - **Recommendation:** Consider using `postgresql://placeholder:placeholder@localhost/testdb` or a clearly synthetic pattern that scanners are less likely to flag. --- ## Summary | Severity | Count | Categories | |----------|-------|------------| | Critical | 0 | -- | | High | 0 | -- | | Medium | 0 | -- | | Low | 5 | Test Coverage (1), Test Flaws (2), Documentation (2) | | Info | 4 | Code Quality (1), Thread Safety (1), Portability (1), Security Scanner (1) | **Overall assessment:** The implementation is solid and correctly addresses all 4 acceptance criteria from issue #733. The prior review findings (mktemp, empty-DB gap, type suppression) were properly resolved. The 6 scenarios cover all meaningful code paths in `_fast_init_or_upgrade`. The closure-cell mocking approach is creative, well-documented, and appropriate for the testing need. The findings above are refinement-level observations -- none block merge.
@ -0,0 +37,4 @@
Scenario: In-memory SQLite delegates to original init_or_upgrade
Given an in-memory SQLite database URL for fast-init testing
When I call init_or_upgrade on the fast-init database
Then the original init_or_upgrade should have been invoked exactly once
Author
Member

L1: Missing scenario for the sqlite:// bare in-memory URL variant. The source code at environment.py:459 checks db_url == "sqlite://" as an alternative to ":memory:" in db_url, but only the :memory: form is tested here. Consider adding a 7th scenario.

**L1:** Missing scenario for the `sqlite://` bare in-memory URL variant. The source code at `environment.py:459` checks `db_url == "sqlite://"` as an alternative to `":memory:" in db_url`, but only the `:memory:` form is tested here. Consider adding a 7th scenario.
@ -0,0 +88,4 @@
cell_ref: Any = cell
saved: Any = cell_ref.cell_contents
mock = MagicMock(name="_original_init_or_upgrade")
cell_ref.cell_contents = mock
Author
Member

I2+I3: This closure cell mutation is (1) not thread-safe -- concurrent callers hitting fallback paths during the with window would invoke the MagicMock -- and (2) CPython-specific (cell_contents is a C-level implementation detail). Both are acceptable for the current Behave sequential execution model targeting CPython, but worth documenting as assumptions.

**I2+I3:** This closure cell mutation is (1) not thread-safe -- concurrent callers hitting fallback paths during the `with` window would invoke the MagicMock -- and (2) CPython-specific (`cell_contents` is a C-level implementation detail). Both are acceptable for the current Behave sequential execution model targeting CPython, but worth documenting as assumptions.
@ -0,0 +28,4 @@
def _register_path_cleanup(context: Context, path: str) -> None:
"""Schedule *path* (and its SQLite sidecar files) for removal."""
if not hasattr(context, "_cleanup_handlers"):
Author
Member

I1: This hasattr guard is technically unreachable -- before_scenario (environment.py:509) always initializes context._cleanup_handlers = [] before any step runs. Consistent with other step files but dead code.

**I1:** This `hasattr` guard is technically unreachable -- `before_scenario` (`environment.py:509`) always initializes `context._cleanup_handlers = []` before any step runs. Consistent with other step files but dead code.
@ -0,0 +157,4 @@
def step_create_nonsqlite_url(context: Context) -> None:
"""Set up a non-SQLite URL (PostgreSQL placeholder)."""
context.fast_init_db_path = None
context.fast_init_db_url = "postgresql://user:pass@localhost/testdb"
Author
Member

I4: Hardcoded user:pass credentials may trigger automated secret scanners. Consider using a clearly synthetic pattern like postgresql://placeholder:placeholder@localhost/testdb.

**I4:** Hardcoded `user:pass` credentials may trigger automated secret scanners. Consider using a clearly synthetic pattern like `postgresql://placeholder:placeholder@localhost/testdb`.
@ -0,0 +180,4 @@
with patch_original_init_or_upgrade() as mock_original:
runner.init_or_upgrade()
context.fast_init_mock_called = mock_original.called
context.fast_init_mock_call_count = mock_original.call_count
Author
Member

L2+L3: The mock's call_args are not captured or verified. Consider storing mock_original.call_args on context so Then steps can assert that self (the runner instance) was passed correctly, and that keyword arguments (e.g., require_confirmation=True) are forwarded when provided.

**L2+L3:** The mock's `call_args` are not captured or verified. Consider storing `mock_original.call_args` on context so Then steps can assert that `self` (the runner instance) was passed correctly, and that keyword arguments (e.g., `require_confirmation=True`) are forwarded when provided.
CoreRasurae left a comment

Independent Code Review Report -- PR #1156 / Issue #733

Reviewer: Independent automated review (3 iterative cycles)
Scope: Code changes in branch test/m3-fast-init-early-return (commit 056ca8f) plus close connections to surrounding code
Cross-referenced: Issue #733 acceptance criteria, docs/specification.md, prior reviews (#72933, #2957, #3054)

Methodology

Performed 3 full review cycles across all categories (bugs, test coverage, test flaws, performance, security, code quality, documentation). Each cycle re-examined every category globally until no new findings emerged. All changed files were read in full; surrounding code (features/environment.py:418-603, migration_runner.py:198-254) was traced to verify behavioral correctness of each scenario.

Acceptance Criteria Verification (Issue #733)

Criterion Status
Test directly exercises _fast_init_or_upgrade with a non-empty DB PASS (Scenario 1)
Test asserts _original_init_or_upgrade is not called PASS (Scenario 1 Then step)
Template-copy path verified for non-existent DBs PASS (Scenario 2)
Test passes under sequential and parallel execution PASS (per commit message validation)

Findings by Severity and Category

LOW -- Test Coverage (1 finding)

L1: Missing sqlite:// bare in-memory URL variant scenario

  • Location: features/fast_init_upgrade.feature (missing scenario)
  • Source reference: features/environment.py:459
  • Issue: The _fast_init_or_upgrade closure checks two in-memory SQLite forms:
    if ":memory:" in db_url or db_url == "sqlite://":
    
    Scenario 5 ("In-memory SQLite delegates") tests sqlite:///:memory: but no scenario tests the sqlite:// bare URL variant. This leaves one branch of the disjunction untested.
  • Risk: If the sqlite:// equality check is accidentally removed or altered, no test would catch the regression.
  • Recommendation: Add a scenario with Given a bare sqlite:// URL for fast-init testing that sets context.fast_init_db_url = "sqlite://" and asserts delegation to original.

LOW -- Test Flaws (2 findings)

L2: Delegation scenarios don't verify arguments passed to mock

  • Location: features/steps/fast_init_upgrade_steps.py:180-183
  • Issue: The three delegation scenarios (non-matching prefix, in-memory, non-SQLite) assert mock_original.call_count == 1 but never verify the mock was called with the correct self argument. The delegation call in _fast_init_or_upgrade is _original_init_or_upgrade(self, **kwargs) -- the self (the MigrationRunner instance) is never validated.
  • Risk: A regression where self is lost or substituted in the delegation call would pass silently.
  • Recommendation: Store mock_original.call_args on context and add a Then step asserting the runner instance was passed as the first positional argument.

L3: No verification that **kwargs are forwarded in delegation paths

  • Location: features/steps/fast_init_upgrade_steps.py:181
  • Issue: runner.init_or_upgrade() is always called without arguments. The original MigrationRunner.init_or_upgrade accepts require_confirmation: bool and prompt_for_migration: Callable. The _fast_init_or_upgrade closure uses **kwargs to forward these, but no scenario exercises this forwarding.
  • Risk: If **kwargs forwarding breaks (e.g., closure signature changes to drop **kwargs), no test catches it.
  • Recommendation: Add at least one delegation scenario variant that passes a keyword argument and verifies it arrives in the mock's call_args.kwargs.

LOW -- Documentation (2 findings)

L4: Commit message claims "5 BDD scenarios" but feature file contains 6

  • Location: Commit 056ca8f message body
  • Issue: The commit message says "Add 5 BDD scenarios" and enumerates 5 bullet points. The feature file contains 6 scenarios -- the "Existing empty database with matching prefix copies template" scenario (added to address prior review feedback) is not reflected in the commit message.
  • Risk: Minor documentation inconsistency.

L5: CHANGELOG entry misleading about "replacing" mktemp

  • Location: CHANGELOG.md, unreleased section
  • Issue: The entry states: "Hardened fast-init step temp-path handling by replacing deprecated insecure mktemp usage with private temp-directory allocation." However, this diff does not replace any existing mktemp calls -- the new code uses mkstemp/mkdtemp from the start. The existing tempfile.mktemp in environment.py:564 (before_scenario) remains untouched.
  • Recommendation: Reword to: "Uses race-safe temp-path allocation (mkstemp/mkdtemp) throughout new fast-init test steps."

INFO -- Code Quality (1 finding)

I1: Redundant hasattr checks in cleanup helpers

  • Location: features/steps/fast_init_upgrade_steps.py:31,44
  • Issue: Both _register_path_cleanup and _register_directory_cleanup guard with if not hasattr(context, "_cleanup_handlers"). However, before_scenario (environment.py:509) always initializes context._cleanup_handlers = [] before any step runs. The guard is dead code in normal execution.
  • Note: This pattern is used consistently across other step files in the codebase (e.g., plan_lifecycle_cli_steps.py:102, config_three_scope_steps.py:85), so it is at least consistent with project conventions.

INFO -- Thread Safety (1 finding)

I2: Class-level closure cell replacement without synchronization

  • Location: features/mocks/fast_init_test_helpers.py:91
  • Issue: patch_original_init_or_upgrade() mutates the _original_init_or_upgrade closure cell on the class-level MigrationRunner.init_or_upgrade function. During the with block window, any concurrent thread hitting a fallback path would invoke the MagicMock instead of the real migration runner.
  • Risk: Theoretical only -- Behave runs scenarios sequentially within a feature, and @mock_only features skip DB-touching setup. Safe in the current execution model.

INFO -- Portability (1 finding)

I3: Closure cell manipulation is CPython-specific

  • Location: features/mocks/fast_init_test_helpers.py:87-91
  • Issue: Direct cell_contents read/write is a CPython implementation detail. Would fail on PyPy or GraalPython.
  • Note: Acceptable for a CPython-targeting test suite. The module docstring documents the mechanism well.

INFO -- Security Scanner (1 finding)

I4: Hardcoded credentials in test fixture

  • Location: features/steps/fast_init_upgrade_steps.py:160
  • Issue: "postgresql://user:pass@localhost/testdb" may trigger automated secret scanners (Gitleaks, Semgrep secrets, etc.) despite being a test-only placeholder.
  • Recommendation: Consider using postgresql://placeholder:placeholder@localhost/testdb or a clearly synthetic pattern.

INFO -- Documentation (1 finding, NEW)

I5: Surrounding code docstring inconsistency

  • Location: features/environment.py:447 (surrounding code, not changed by this PR)
  • Issue: The _fast_init_or_upgrade docstring says "In-memory SQLite -> Base.metadata.create_all() + alembic stamp" but the actual implementation delegates to _original_init_or_upgrade. The test correctly verifies the actual behavior (delegation), not the documented behavior.
  • Note: Outside this PR's scope but worth noting since the test is testing against a function whose docstring describes different behavior than what's implemented.

Summary

Severity Count Categories
Critical 0 --
High 0 --
Medium 0 --
Low 5 Test Coverage (1), Test Flaws (2), Documentation (2)
Info 5 Code Quality (1), Thread Safety (1), Portability (1), Security Scanner (1), Documentation (1)

Overall Assessment

The implementation correctly addresses all 4 acceptance criteria from issue #733. The 6 BDD scenarios cover all meaningful code paths in _fast_init_or_upgrade (early return, template copy, empty-DB copy, non-matching prefix fallback, in-memory fallback, non-SQLite fallback). The closure-cell mocking approach in fast_init_test_helpers.py is creative, well-documented, and appropriate for the testing need.

Prior review findings (insecure mktemp, missing empty-DB scenario, type suppression) were properly resolved in the current commit. The remaining findings are refinement-level observations. None of the findings block merge.

This independent review confirms the findings from the prior self-review (#3054) and adds one new informational item (I5). The PR has already been APPROVED by @freemo (#2957).

## Independent Code Review Report -- PR #1156 / Issue #733 **Reviewer:** Independent automated review (3 iterative cycles) **Scope:** Code changes in branch `test/m3-fast-init-early-return` (commit `056ca8f`) plus close connections to surrounding code **Cross-referenced:** Issue #733 acceptance criteria, `docs/specification.md`, prior reviews (#72933, #2957, #3054) ### Methodology Performed 3 full review cycles across all categories (bugs, test coverage, test flaws, performance, security, code quality, documentation). Each cycle re-examined every category globally until no new findings emerged. All changed files were read in full; surrounding code (`features/environment.py:418-603`, `migration_runner.py:198-254`) was traced to verify behavioral correctness of each scenario. ### Acceptance Criteria Verification (Issue #733) | Criterion | Status | |-----------|--------| | Test directly exercises `_fast_init_or_upgrade` with a non-empty DB | PASS (Scenario 1) | | Test asserts `_original_init_or_upgrade` is not called | PASS (Scenario 1 Then step) | | Template-copy path verified for non-existent DBs | PASS (Scenario 2) | | Test passes under sequential and parallel execution | PASS (per commit message validation) | --- ## Findings by Severity and Category ### LOW -- Test Coverage (1 finding) #### L1: Missing `sqlite://` bare in-memory URL variant scenario - **Location:** `features/fast_init_upgrade.feature` (missing scenario) - **Source reference:** `features/environment.py:459` - **Issue:** The `_fast_init_or_upgrade` closure checks **two** in-memory SQLite forms: ```python if ":memory:" in db_url or db_url == "sqlite://": ``` Scenario 5 ("In-memory SQLite delegates") tests `sqlite:///:memory:` but no scenario tests the `sqlite://` bare URL variant. This leaves one branch of the disjunction untested. - **Risk:** If the `sqlite://` equality check is accidentally removed or altered, no test would catch the regression. - **Recommendation:** Add a scenario with `Given a bare sqlite:// URL for fast-init testing` that sets `context.fast_init_db_url = "sqlite://"` and asserts delegation to original. --- ### LOW -- Test Flaws (2 findings) #### L2: Delegation scenarios don't verify arguments passed to mock - **Location:** `features/steps/fast_init_upgrade_steps.py:180-183` - **Issue:** The three delegation scenarios (non-matching prefix, in-memory, non-SQLite) assert `mock_original.call_count == 1` but never verify the mock was called with the correct `self` argument. The delegation call in `_fast_init_or_upgrade` is `_original_init_or_upgrade(self, **kwargs)` -- the `self` (the `MigrationRunner` instance) is never validated. - **Risk:** A regression where `self` is lost or substituted in the delegation call would pass silently. - **Recommendation:** Store `mock_original.call_args` on context and add a Then step asserting the runner instance was passed as the first positional argument. #### L3: No verification that `**kwargs` are forwarded in delegation paths - **Location:** `features/steps/fast_init_upgrade_steps.py:181` - **Issue:** `runner.init_or_upgrade()` is always called without arguments. The original `MigrationRunner.init_or_upgrade` accepts `require_confirmation: bool` and `prompt_for_migration: Callable`. The `_fast_init_or_upgrade` closure uses `**kwargs` to forward these, but no scenario exercises this forwarding. - **Risk:** If `**kwargs` forwarding breaks (e.g., closure signature changes to drop `**kwargs`), no test catches it. - **Recommendation:** Add at least one delegation scenario variant that passes a keyword argument and verifies it arrives in the mock's `call_args.kwargs`. --- ### LOW -- Documentation (2 findings) #### L4: Commit message claims "5 BDD scenarios" but feature file contains 6 - **Location:** Commit `056ca8f` message body - **Issue:** The commit message says "Add 5 BDD scenarios" and enumerates 5 bullet points. The feature file contains **6** scenarios -- the "Existing empty database with matching prefix copies template" scenario (added to address prior review feedback) is not reflected in the commit message. - **Risk:** Minor documentation inconsistency. #### L5: CHANGELOG entry misleading about "replacing" mktemp - **Location:** `CHANGELOG.md`, unreleased section - **Issue:** The entry states: *"Hardened fast-init step temp-path handling by **replacing** deprecated insecure `mktemp` usage with private temp-directory allocation."* However, this diff does not replace any existing `mktemp` calls -- the new code uses `mkstemp`/`mkdtemp` from the start. The existing `tempfile.mktemp` in `environment.py:564` (`before_scenario`) remains untouched. - **Recommendation:** Reword to: *"Uses race-safe temp-path allocation (`mkstemp`/`mkdtemp`) throughout new fast-init test steps."* --- ### INFO -- Code Quality (1 finding) #### I1: Redundant `hasattr` checks in cleanup helpers - **Location:** `features/steps/fast_init_upgrade_steps.py:31,44` - **Issue:** Both `_register_path_cleanup` and `_register_directory_cleanup` guard with `if not hasattr(context, "_cleanup_handlers")`. However, `before_scenario` (`environment.py:509`) **always** initializes `context._cleanup_handlers = []` before any step runs. The guard is dead code in normal execution. - **Note:** This pattern is used consistently across other step files in the codebase (e.g., `plan_lifecycle_cli_steps.py:102`, `config_three_scope_steps.py:85`), so it is at least consistent with project conventions. --- ### INFO -- Thread Safety (1 finding) #### I2: Class-level closure cell replacement without synchronization - **Location:** `features/mocks/fast_init_test_helpers.py:91` - **Issue:** `patch_original_init_or_upgrade()` mutates the `_original_init_or_upgrade` closure cell on the **class-level** `MigrationRunner.init_or_upgrade` function. During the `with` block window, any concurrent thread hitting a fallback path would invoke the `MagicMock` instead of the real migration runner. - **Risk:** Theoretical only -- Behave runs scenarios sequentially within a feature, and `@mock_only` features skip DB-touching setup. Safe in the current execution model. --- ### INFO -- Portability (1 finding) #### I3: Closure cell manipulation is CPython-specific - **Location:** `features/mocks/fast_init_test_helpers.py:87-91` - **Issue:** Direct `cell_contents` read/write is a CPython implementation detail. Would fail on PyPy or GraalPython. - **Note:** Acceptable for a CPython-targeting test suite. The module docstring documents the mechanism well. --- ### INFO -- Security Scanner (1 finding) #### I4: Hardcoded credentials in test fixture - **Location:** `features/steps/fast_init_upgrade_steps.py:160` - **Issue:** `"postgresql://user:pass@localhost/testdb"` may trigger automated secret scanners (Gitleaks, Semgrep secrets, etc.) despite being a test-only placeholder. - **Recommendation:** Consider using `postgresql://placeholder:placeholder@localhost/testdb` or a clearly synthetic pattern. --- ### INFO -- Documentation (1 finding, NEW) #### I5: Surrounding code docstring inconsistency - **Location:** `features/environment.py:447` (surrounding code, not changed by this PR) - **Issue:** The `_fast_init_or_upgrade` docstring says *"In-memory SQLite -> `Base.metadata.create_all()` + alembic stamp"* but the actual implementation delegates to `_original_init_or_upgrade`. The test correctly verifies the **actual** behavior (delegation), not the documented behavior. - **Note:** Outside this PR's scope but worth noting since the test is testing against a function whose docstring describes different behavior than what's implemented. --- ## Summary | Severity | Count | Categories | |----------|-------|------------| | Critical | 0 | -- | | High | 0 | -- | | Medium | 0 | -- | | Low | 5 | Test Coverage (1), Test Flaws (2), Documentation (2) | | Info | 5 | Code Quality (1), Thread Safety (1), Portability (1), Security Scanner (1), Documentation (1) | ## Overall Assessment The implementation correctly addresses all 4 acceptance criteria from issue #733. The 6 BDD scenarios cover all meaningful code paths in `_fast_init_or_upgrade` (early return, template copy, empty-DB copy, non-matching prefix fallback, in-memory fallback, non-SQLite fallback). The closure-cell mocking approach in `fast_init_test_helpers.py` is creative, well-documented, and appropriate for the testing need. Prior review findings (insecure mktemp, missing empty-DB scenario, type suppression) were properly resolved in the current commit. The remaining findings are refinement-level observations. **None of the findings block merge.** This independent review confirms the findings from the prior self-review (#3054) and adds one new informational item (I5). The PR has already been APPROVED by @freemo (#2957).
CoreRasurae force-pushed test/m3-fast-init-early-return from a52b54b4ca
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 18s
CI / unit_tests (pull_request) Successful in 3m4s
CI / lint (pull_request) Successful in 3m28s
CI / quality (pull_request) Successful in 3m41s
CI / integration_tests (pull_request) Successful in 3m42s
CI / security (pull_request) Successful in 4m0s
CI / typecheck (pull_request) Successful in 4m15s
CI / e2e_tests (pull_request) Failing after 4m25s
CI / docker (pull_request) Failing after 10m22s
CI / coverage (pull_request) Failing after 10m22s
CI / benchmark-regression (pull_request) Failing after 40m21s
CI / status-check (pull_request) Has been cancelled
to e3703f953b
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 19s
CI / build (pull_request) Successful in 20s
CI / helm (pull_request) Successful in 21s
CI / typecheck (pull_request) Successful in 1m6s
CI / security (pull_request) Successful in 1m8s
CI / quality (pull_request) Successful in 3m42s
CI / unit_tests (pull_request) Successful in 9m15s
CI / integration_tests (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / e2e_tests (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
2026-04-01 22:42:44 +00:00
Compare
CoreRasurae dismissed freemo's review 2026-04-01 22:42:44 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

CoreRasurae force-pushed test/m3-fast-init-early-return from e3703f953b
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 19s
CI / build (pull_request) Successful in 20s
CI / helm (pull_request) Successful in 21s
CI / typecheck (pull_request) Successful in 1m6s
CI / security (pull_request) Successful in 1m8s
CI / quality (pull_request) Successful in 3m42s
CI / unit_tests (pull_request) Successful in 9m15s
CI / integration_tests (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / e2e_tests (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
to b21e0fedea
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / helm (pull_request) Successful in 24s
CI / typecheck (pull_request) Successful in 50s
CI / security (pull_request) Successful in 1m10s
CI / lint (pull_request) Successful in 3m20s
CI / quality (pull_request) Successful in 3m45s
CI / unit_tests (pull_request) Successful in 5m53s
CI / docker (pull_request) Successful in 1m32s
CI / coverage (pull_request) Successful in 12m27s
CI / e2e_tests (pull_request) Successful in 19m48s
CI / integration_tests (pull_request) Successful in 22m24s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 16s
CI / helm (push) Successful in 22s
CI / lint (push) Successful in 3m17s
CI / quality (push) Successful in 3m39s
CI / typecheck (push) Successful in 3m53s
CI / security (push) Successful in 4m4s
CI / unit_tests (push) Successful in 9m13s
CI / docker (push) Successful in 20s
CI / coverage (push) Successful in 12m20s
CI / e2e_tests (push) Successful in 19m18s
CI / integration_tests (push) Successful in 24m36s
CI / status-check (push) Successful in 2s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-regression (pull_request) Successful in 55m5s
CI / benchmark-publish (push) Successful in 28m26s
2026-04-01 22:52:31 +00:00
Compare
CoreRasurae scheduled this pull request to auto merge when all checks succeed 2026-04-01 22:56:58 +00:00
CoreRasurae deleted branch test/m3-fast-init-early-return 2026-04-01 23:14:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core!1156
No description provided.