Skip to content

Add approval testing: verify artifacts against approved baselines#243

Merged
JE-Chen merged 1 commit into
devfrom
feat/approval-testing-batch
Jun 19, 2026
Merged

Add approval testing: verify artifacts against approved baselines#243
JE-Chen merged 1 commit into
devfrom
feat/approval-testing-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 19, 2026

Copy link
Copy Markdown
Member

Testing batch — golden-master / snapshot testing for any artifact. Full layers + tests + EN/Zh v35 docs + README.

Feature (utils/approval, pure-stdlib)

  • verify_artifact(name, content, approvals_dir, extension) compares produced content (str or bytes) to a stored <name>.approved.<ext> baseline. On match: pass, stale received cleared. On mismatch/missing baseline: writes <name>.received.<ext> for review and returns match=False (status mismatch/new). approve_artifact promotes a reviewed received file to the baseline; pending_artifacts lists names awaiting approval. Names are path-traversal-checked.
  • Works for rendered text, JSON, OCR output, screenshot bytes — complements pixel diffing with a review-gated baseline committed alongside the test.
  • Executor AC_verify_artifact / AC_approve_artifact / AC_pending_artifacts; MCP ac_*; Builder under Testing.

Verification

  • 10 tests pass (new→received, approve→match, mismatch re-writes received, verified clears stale received, bytes/png, approve-without-received raises, path-traversal rejected, executor round-trip, wiring); ruff clean; radon no CC≥C; bandit clean; PySide6-free.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 45 complexity · 0 duplication

Metric Results
Complexity 45
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit 052286c into dev Jun 19, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/approval-testing-batch branch June 19, 2026 15:03
@sonarqubecloud

Copy link
Copy Markdown

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