Commit Graph

4 Commits

Author SHA1 Message Date
freemo b122ec7ed5 fix(test-infra): remove redundant ${PYTHON} variable definitions from robot files
CI / lint (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 51s
CI / typecheck (pull_request) Successful in 1m0s
CI / security (pull_request) Successful in 55s
CI / build (pull_request) Successful in 25s
CI / helm (pull_request) Successful in 32s
CI / push-validation (pull_request) Successful in 26s
CI / e2e_tests (pull_request) Successful in 3m38s
CI / integration_tests (pull_request) Successful in 6m42s
CI / unit_tests (pull_request) Successful in 8m19s
CI / docker (pull_request) Successful in 13s
CI / coverage (pull_request) Successful in 15m23s
CI / status-check (pull_request) Successful in 2s
Remove the local ${PYTHON}    python (and python3) variable definitions from
the *** Variables *** sections of all affected robot files. These local
definitions were overriding the pabot-injected venv Python path passed via
--variable PYTHON:/path/to/venv/python, causing tests to use the system
Python (which lacks required packages like structlog, sqlalchemy, etc.)
instead of the nox venv Python.

The correct ${PYTHON} value is already set by Setup Test Environment in
common.resource via sys.executable, and pabot passes it via --variable.
The local fallback definitions are redundant and harmful in parallel runs.

Audit found 56 robot files with the pattern (more than the 9 originally
identified in the issue). All occurrences have been removed.

ISSUES CLOSED: #1309
2026-04-14 14:50:55 +00:00
brent.edwards 3eecb79003 test(plan): TDD failing tests for checkpoint real rollback (bug #822)
CI / lint (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 46s
CI / typecheck (pull_request) Successful in 56s
CI / security (pull_request) Successful in 56s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 29s
CI / e2e_tests (pull_request) Successful in 2m7s
CI / unit_tests (pull_request) Successful in 3m8s
CI / docker (pull_request) Successful in 9s
CI / integration_tests (pull_request) Successful in 3m57s
CI / coverage (pull_request) Successful in 7m48s
CI / benchmark-regression (pull_request) Successful in 40m48s
TDD expected-fail tests proving bug #822 exists:
CheckpointService.rollback_to_checkpoint() returns a successful
RollbackResult but does not execute git reset --hard. Files modified
after the checkpoint remain unchanged after rollback.

Also fixes Robot Framework timeout robustness across the entire test
suite: all Run Process calls now use on_timeout=kill (prevents
SIGTERM-induced -15 exit codes under CI load) and timeouts increased
to 120s (prevents premature kills during heavy parallel execution).

ISSUES CLOSED: #839
2026-03-16 01:45:50 +00:00
hurui200320 cb1403c24d test(e2e): validate M3 acceptance criteria for v3.2.0 milestone closure (#559)
CI / lint (push) Successful in 15s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 24s
CI / security (push) Successful in 34s
CI / typecheck (push) Successful in 54s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 3m14s
CI / unit_tests (push) Successful in 3m34s
CI / docker (push) Successful in 41s
CI / coverage (push) Successful in 4m26s
CI / benchmark-publish (push) Has been cancelled
## Summary

Validates all 10 M3 (v3.2.0) acceptance criteria via the E2E verification suite. This is the final gate before closing milestone v3.2.0.

### Single Commit (Squashed per CONTRIBUTING.md)

Branch history was squashed from 2 commits into 1 (`e1665c6e`) to comply with the one-commit-per-issue rule. The single commit includes:

1. **Original work**: Suite-level Force Tags, per-test acceptance criteria tags, enhanced documentation with milestone cross-references, CHANGELOG and CONTRIBUTORS entries.
2. **Review feedback fixes** (addressing Luis's CRITICAL/HIGH findings): Replaced fixture-self-assertion patterns with real CLI-path validation for all 10 acceptance criteria, added persistence-backed decision tree checks, robust JSON output parsing, explicit Robot process timeouts, and clearer correction tags.
3. **Rebase onto current master** (`fff6bb38`): Clean rebase resolving CHANGELOG conflict, as requested by PM (freemo).
4. **Bug fix — `async_enabled` attribute**: `PlanLifecycleService.execute_plan()` accesses `self.settings.async_enabled` (`plan_lifecycle_service.py:283`). The test helper's `_make_settings()` used `create_autospec(Settings)` but didn't set this attribute, causing `plan execute` CLI tests to fail with `AttributeError`. Fixed by adding `settings.async_enabled = False`.
5. **Timeout fixes for parallel execution**: When `pabot` runs 16 parallel Robot processes, cold-start import times + Alembic migrations cause 30s timeouts to be insufficient. Increased timeouts from 30s to 120s in 3 robot files: `actor_context_management.robot`, `decision_di_wiring_smoke.robot`, `changeset_persistence.robot`.

### Files Changed (7)

| File | Change |
|------|--------|
| `robot/helper_m3_e2e_verification.py` | Rewritten for real CLI-path validation; `_make_settings()` fixed with `async_enabled = False` |
| `robot/m3_e2e_verification.robot` | Force Tags, per-test tags, timeouts, enhanced docs |
| `robot/actor_context_management.robot` | Timeout 30s → 120s (line 92) |
| `robot/decision_di_wiring_smoke.robot` | Timeout 30s → 120s (lines 14, 21) |
| `robot/changeset_persistence.robot` | `${TIMEOUT}` 30s → 120s (line 12) |
| `CHANGELOG.md` | Entry for #494 |
| `CONTRIBUTORS.md` | Added Rui Hu |

### Acceptance Criteria Verified (10/10)

**Success Criteria:**
- `plan use` + `plan execute` generates decisions during Strategize
- `plan tree` displays decision tree correctly (via CLI invocation)
- `plan explain` shows full decision context (via CLI invocation)
- `invariant add --project` / `invariant list --project` work with project scope
- `plan correct --dry-run` performs impact analysis (via CLI invocation)
- `plan correct --mode=revert` executes live correction (via CLI invocation)

**Technical Criteria:**
- Decisions recorded with full context snapshot
- Decision tree persists to database and renders correctly
- Correction in revert mode re-executes from decision point
- Invariants enforced during strategize

### Quality Gates (Full Nox Suite)

| Session | Result | Details |
|---------|--------|---------|
| `lint` | PASS | ruff clean |
| `format` | PASS | ruff format clean |
| `typecheck` | PASS | pyright 0 errors, 0 warnings |
| `security_scan` | PASS | bandit clean |
| `dead_code` | PASS | vulture clean |
| `unit_tests` | PASS | 8500 BDD scenarios, 0 failures |
| `integration_tests` | PASS | 1194/1194 tests, 0 failures |
| `docs` | PASS | mkdocs build clean |
| `build` | PASS | wheel built |
| `benchmark` | PASS | performance benchmarks pass |
| `coverage_report` | PASS | 96.96% → rounds to 97% (meets `--fail-under=97`) |

Closes #494

Reviewed-on: #559
Reviewed-by: Luis Mendes <luis.mendes@cleverthis.com>
Co-authored-by: Rui Hu <rui.hu@cleverthis.com>
Co-committed-by: Rui Hu <rui.hu@cleverthis.com>
2026-03-05 15:09:19 +00:00
freemo e3fcce413b feat(changeset): persist changesets and diff artifacts
CI / lint (pull_request) Successful in 24s
CI / typecheck (pull_request) Successful in 59s
CI / security (pull_request) Successful in 53s
CI / quality (pull_request) Successful in 36s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 27s
CI / integration_tests (pull_request) Successful in 5m30s
CI / benchmark-regression (pull_request) Successful in 25m38s
CI / unit_tests (pull_request) Successful in 36m51s
CI / docker (pull_request) Successful in 1m3s
CI / coverage (pull_request) Successful in 1h48m49s
CI / lint (push) Successful in 22s
CI / security (push) Successful in 58s
CI / typecheck (push) Successful in 1m3s
CI / quality (push) Successful in 46s
CI / build (push) Successful in 23s
CI / integration_tests (push) Successful in 5m23s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Successful in 15m5s
CI / unit_tests (push) Successful in 20m1s
CI / docker (push) Successful in 1m0s
CI / coverage (push) Successful in 1h45m36s
Add SQLite persistence for ChangeSet entries and ToolInvocation records
via new changeset_repository module implementing the ChangeSetStore protocol.

- Alembic migration d0_001 creates changeset_entries and tool_invocations tables
- SqliteChangeSetStore, ChangeSetEntryRepository, ToolInvocationRepository
- PlanApplyService.cleanup_changeset() for cancel/failure cleanup
- Behave tests (17 scenarios), Robot tests (5 cases), ASV benchmarks
- Reference documentation in docs/reference/changeset.md

Closes #163
2026-02-26 02:47:14 +00:00