Skip to content

test: add real E2E integration suite across the ecosystem (issue #9)#15

Merged
wesleysimplicio merged 1 commit into
masterfrom
fix/issue-9
Jul 14, 2026
Merged

test: add real E2E integration suite across the ecosystem (issue #9)#15
wesleysimplicio merged 1 commit into
masterfrom
fix/issue-9

Conversation

@wesleysimplicio

Copy link
Copy Markdown
Owner

Closes #9

Summary

Adds a real, runnable end-to-end integration test suite for this repo's
role in the Simplicio ecosystem. wesleysimplicio/simplicio is the public
distribution repo (compiled runtime binary + npm/pip/brew wrappers) β€”
the runtime/mapper/dev-cli/prompt/sprint source lives in sibling repos and
is only consumed here as optional PATH adapters (see simplicio version --json
-> components). Per the task constraints, no cargo build/check/test is
invoked anywhere; every check exercises the binary already committed in the
repo root, exactly as a real installer/CI consumer would.

  • scripts/e2e_ecosystem.py β€” runs each "cenario minimo" from the issue
    against a disposable ephemeral temp repo (created/torn down per run, never
    touching real ~/.simplicio state):
    1. Clean install & initialization (simplicio setup)
    2. Valid vs. corrupted config loading (simplicio doctor)
    3. Project discovery/mapping (simplicio runtime map)
    4. A complete task end-to-end, input -> final result (simplicio edit,
      asserts the file content actually changed on disk)
    5. Error propagation + retry-exhaustion/cancellation diagnostics
      (simplicio edit with a bad pattern, simplicio recover)
    6. State persistence/resume across independent process invocations
      (.simplicio/ directory)
    7. Compatibility with published dependencies (simplicio version --json
      compatibility matrix + reuse of the existing
      scripts/verify_distribution_consistency.py packaging gate)
  • .github/workflows/e2e.yml β€” runs the suite on windows-latest for PRs
    and pushes touching the binaries/wrappers/manifest/scripts, plus
    workflow_dispatch for on-demand runs; uploads stdout as a build artifact
    so a failing run always ships attached diagnostics.
  • docs/e2e-integration.md β€” commands, scenario-to-command mapping, and a
    captured evidence run (9/10 scenarios passing).

Known finding (real, pre-existing, not introduced here)

Scenario 7b currently fails: version.txt (3.0.2) and the npm/PyPI/Homebrew
wrapper package versions lag simplicio-update-manifest.json (3.5.2,
published in commit e24b426). This is exactly the failure mode issue #9
asks the pipeline to catch ("Contratos incompativeis fazem o pipeline
falhar"), so it is left failing on purpose rather than hidden. Documented
as a follow-up in docs/e2e-integration.md rather than fixed in this PR to
keep the diff focused on the testing infrastructure itself.

Next steps (documented in docs/e2e-integration.md)

  • Fix the version drift found by 7b (separate concern from adding tests).
  • Add macOS/Linux CI legs.
  • Extend scenario 5 with real mid-flight cancellation once the CLI exposes
    a stable cancellation-token flow.
  • Wire simplicio contracts smoke / simplicio runtime smoke in once their
    expected fixture layout is defined for a minimal ephemeral repo.

Test plan

  • python scripts/e2e_ecosystem.py run locally on Windows against
    simplicio-windows-x64.exe v1.6.4 β€” 9/10 scenarios pass (see
    docs/e2e-integration.md for full captured output and the one known,
    pre-existing, intentionally-uncovered finding).
  • No cargo build/check/test invoked.

Adds scripts/e2e_ecosystem.py, exercising the already-compiled simplicio
binary end to end in an ephemeral temp repo: clean install/init, valid vs
corrupted config loading, project mapping, a full mechanical-edit task
(input to final result), error/retry-exhaustion propagation, state
persistence/resume across process runs, and compatibility with the
published npm/PyPI/Homebrew packages (reusing verify_distribution_consistency.py).

Wires it into .github/workflows/e2e.yml (PR + push + workflow_dispatch) so
it is reproducible in CI, and documents commands/evidence/known findings in
docs/e2e-integration.md. No cargo build/check/test is invoked anywhere.

One real drift was found and intentionally left failing as evidence the
gate works: version.txt/wrapper packages lag simplicio-update-manifest.json
(3.0.2 vs 3.5.2) - documented as a follow-up in docs/e2e-integration.md.

Closes #9
@wesleysimplicio
wesleysimplicio merged commit 300f6fd into master Jul 14, 2026
0 of 13 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b581c2d1c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/e2e.yml
Comment on lines +21 to +22
- "scripts/e2e_ecosystem.py"
- "scripts/verify_distribution_consistency.py"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include all consistency-check inputs in the path filter

This workflow is the only new place that runs scripts/verify_distribution_consistency.py, but the PR path filter does not include several files that script reads, including README.md, INSTALL.md, install.sh, install.ps1, .github/workflows/release.yml, VERSION.md, and READMEs/*.md. A PR that reintroduces an invalid /main/ install URL in one of those files will not trigger this gate at all, so the added consistency check can be bypassed unless those inputs are added to the filter or the filter is removed.

Useful? React with πŸ‘Β / πŸ‘Ž.

Comment thread scripts/e2e_ecosystem.py
Comment on lines +76 to +77
p = Path(explicit)
return p if p.exists() else None

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve explicit binary paths before changing cwd

When --binary is given as a relative path from the repo root, as documented with --binary ./simplicio.exe, this returns the relative Path unchanged, but every subprocess later runs with cwd set to the temporary repo. That makes Python look for the binary inside the temp repo and the suite crashes with FileNotFoundError; resolve the explicit path before storing it.

Useful? React with πŸ‘Β / πŸ‘Ž.

Comment thread scripts/e2e_ecosystem.py
# A corrupted config must not crash the runtime (no panic/traceback) and
# must still produce a diagnostic the caller can act on.
crashed = proc_invalid.returncode not in (0, 1) or "panic" in proc_invalid.stderr.lower()
invalid_ok = not crashed and (proc_invalid.stdout.strip() or proc_invalid.stderr.strip())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep JSON result fields boolean

When the corrupted-config doctor call emits diagnostics, this expression returns the diagnostic string instead of a boolean, so Report.add() stores a string in Result.passed. With --json, the summary then contains a huge string for passed rather than true/false, breaking consumers that rely on the advertised machine-readable output.

Useful? React with πŸ‘Β / πŸ‘Ž.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Integration/E2E] Validar os fluxos reais entre os componentes do ecossistema

1 participant