Skip to content

feat(e2e): behaviour-first BDD, near-full UI coverage + malformed-diff renderer fix (v0.1.4) - #17

Merged
omar-nahhas merged 5 commits into
mainfrom
bdd/v2
Jul 29, 2026
Merged

feat(e2e): behaviour-first BDD, near-full UI coverage + malformed-diff renderer fix (v0.1.4)#17
omar-nahhas merged 5 commits into
mainfrom
bdd/v2

Conversation

@omar-nahhas

Copy link
Copy Markdown
Contributor

What

  • Adopts devkit v2.1.0 BDD standard (existing bdd/v2 work) and completes it:
    • fix(tests): conftest plugin_dir fixture pointed at the pre-migration root path — 5/7 L1 tests failed with FileNotFoundError; now 7/7 green.
    • feat(e2e): new 20-diff-interactions.feature with BEH-tagged scenarios: maximize overlay (BEH-4), close via button/backdrop/Escape (BEH-5a-c), copy raw source (BEH-6), multi-file fence, malformed-diff fallback (BEH-3), non-diff-fence negative. Closes spec gaps SR-4/SR-5/SR-6.
    • fix(renderer): the red malformed-diff test caught a real bug — diff2html emits an outer d2h-wrapper even for unparseable text, so the swap gate replaced readable content with an EMPTY container. Gate now keys on d2h-file-wrapper (≥1 parsed file). v0.1.2 → v0.1.4.

Verification (local harness, replicating CI invocation)

  • bdd-lint: feature-purity / honesty / traceability all PASS (2 feature files)
  • seam-off red-proof: 0 scenarios pass without the plugin (Gate 3 caught + fixed a fake-green negative formulation along the way)
  • Full run: 11 passed, 0 failed, 0 skipped (2.5m), EXIT=0
  • L1 pytest: 7 passed, 0 skipped

The layout-standardization commit moved the plugin from <root>/diff_visualizer
to usr/plugins/diff_visualizer (per .devkit.yml plugin_dir) but left the
conftest fixture on the old path. Red evidence: 5/7 tests failed with
FileNotFoundError on diff_visualizer/plugin.yaml before this fix; 7/7 pass after.
… malformed diffs (v0.1.4)

New BDD scenarios (20-diff-interactions.feature, BEH-tagged): maximize overlay,
all three close paths (button/backdrop/Escape), copy-raw-source, multi-file
fence, malformed-diff fallback, non-diff-fence negative. Closes spec gaps
SR-4/SR-5/SR-6. Negative scenarios carry positive anchors so the seam-off
red-proof stays red (Gate 3 caught the first fake-green formulation).

Renderer fix the red test caught: diff2html emits an outer d2h-wrapper even for
unparseable text, so the swap gate matched and replaced readable content with an
EMPTY container. Gate now keys on d2h-file-wrapper (>=1 parsed file).
Red: 'Malformed diff' scenario Expected 1 container, Received 2. Green after.

Harness result: 11 passed (2.5m), 0 skipped, red-proof 0-pass seam-off, EXIT=0.
The unit workflow (merged from main) checks out with submodules: recursive
using the default GITHUB_TOKEN, which cannot read the private
agent-zero-plugin-development-testkit repo — observed 'Repository not found'
10s failure on chore/license-apache2. Use the shared sync App (same secrets
as devkit-sync.yml) per the org-wide App-token preference.
… via App-token extraheader

Previous attempt fed the App token to checkout itself — but the sync App is
not installed on this repo, so checkout failed 'Repository not found'
(run 30449937662). Mirror the reusable plugin-e2e workflow's proven pattern:
default-token checkout (submodules: false), then
'git -c http.extraheader submodule update --init --recursive tests/_testkit'
with the App token (also pulls the nested public .agent-zero the L1
surface-validation tests read).
@github-actions

Copy link
Copy Markdown
Contributor

🚫 Merge blockedplugin-e2e concluded failure, so this PR was converted to draft. Fix the gates (see tests/_testkit/docs/BDD-GATES.md); a green run marks it ready again. The publish gate also blocks shipping until green.

@omar-nahhas
omar-nahhas merged commit a8a9e2a into main Jul 29, 2026
4 of 5 checks passed
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.

1 participant