feat: prepare TeaForge 0.2.0 beta - #1
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Prepares the TeaForge 0.2.0 beta by expanding the CLI from “pytest PCL generation” into a packaged, cross-framework tool that can also (optionally) execute project-local test runners to capture runtime assertion evidence, generate multi-page Mermaid-backed coverage reports, and enforce deterministic artifact output.
Changes:
- Added bounded external-process execution utilities (timeouts, output caps, process-tree cleanup) and wired adapters to use them instead of direct
subprocess.run. - Introduced Jest runtime assertion evidence capture (JSONL listener + redaction/limits) and Tree-sitter–based JS/TS/TSX structural parsing.
- Added versioned, atomic, packaged report artifacts (templates/resources), plus
doctorcapability checks and CI for lint/coverage/packaging/integrations.
Reviewed changes
Copilot reviewed 67 out of 75 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/render/package.json | Adds locked Mermaid CLI tool deps for CI/rendering. |
| tests/test_process.py | Tests bounded process execution and timeouts. |
| tests/test_parser.py | Adds regression for pytest import resolution. |
| tests/test_naming.py | Tests collision-free output folder naming. |
| tests/test_mermaid.py | Tests diagram-type detection and renderer errors. |
| tests/test_jest_runtime.py | Tests runtime evidence capture/enrichment/loading. |
| tests/test_jest_project.py | Tests project-local Jest discovery/execution behavior. |
| tests/test_jest_parser.py | Extends Jest parser coverage (CJS/TSX/default export). |
| tests/test_javascript_syntax.py | Adds Tree-sitter structural syntax unit tests. |
| tests/test_export.py | Ensures export fails early for missing HTML. |
| tests/test_doctor.py | Validates doctor machine-readable and CLI behavior. |
| tests/test_discovery.py | Tests dependency-tree pruning in discovery. |
| tests/test_coverage_report.py | Tests coverage gating, embedding safety, diagrams. |
| tests/test_cli_integration.py | Adds CLI exit-code/version/schema integration tests. |
| tests/test_artifacts.py | Tests atomic writes + safe JSON embedding. |
| tests/fixtures/coverage_project/tests/test_app.py | Adds external fixture project test file. |
| tests/fixtures/coverage_project/pyproject.toml | Adds fixture pytest/coverage settings. |
| tests/fixtures/coverage_project/app.py | Adds fixture app code for coverage. |
| tests/conftest.py | Ignores nested fixture pytest root. |
| src/teaforge/templates/pcl.html | New packaged PCL HTML template. |
| src/teaforge/templates/coverage_report.html | New packaged multi-page coverage template. |
| src/teaforge/templates/init.py | Declares templates package. |
| src/teaforge/process.py | Adds bounded process runner + workflow deadlines. |
| src/teaforge/playwright/parser.py | Switches to shared PCL assembly helpers + full names. |
| src/teaforge/pcl/service.py | Adds runtime evidence options + atomic outputs. |
| src/teaforge/pcl/render.py | Uses packaged template + safe embedded JSON. |
| src/teaforge/pcl/pdf.py | Adds missing-input guard + suppressed import noise. |
| src/teaforge/pcl/parser.py | Uses discovery + deterministic import resolution roots. |
| src/teaforge/pcl/models.py | Adds schema + runtime-evidence fields/models. |
| src/teaforge/pcl/classification.py | Minor formatting cleanup. |
| src/teaforge/pcl/backends.py | Adds evidence-mode routing and runtime enrichment. |
| src/teaforge/pcl/assembly.py | Centralizes document merge + matrix row building. |
| src/teaforge/pcl/init.py | Exposes new PCL evidence model. |
| src/teaforge/naming.py | Adds collision-free source folder naming. |
| src/teaforge/jest/runtime.py | Implements runtime evidence run + loader + matcher. |
| src/teaforge/jest/project.py | Project-local Jest discovery + execution wrapper. |
| src/teaforge/jest/coverage.py | Uses Tree-sitter + project-local Jest (no npx). |
| src/teaforge/jest/assets/runtime-listener.cjs | Listener to capture/redact/bound assertion evidence. |
| src/teaforge/jest/assets/init.py | Declares Jest assets package. |
| src/teaforge/javascript/init.py | Exports JS syntax evidence API. |
| src/teaforge/doctor.py | Adds capability inspection + JSON output. |
| src/teaforge/discovery.py | Adds pruned filesystem discovery helper. |
| src/teaforge/coverage/service.py | Adds C0/C1 gates + flowchart/sequence pages + atomic writes. |
| src/teaforge/coverage/render.py | Uses packaged template + safe embedded JSON. |
| src/teaforge/coverage/models.py | Adds schema v2 + diagram artifacts + metric applicability. |
| src/teaforge/coverage/mermaid.py | Adds diagram-type support + bounded renderer execution. |
| src/teaforge/coverage/analyzer.py | Adds workflow deadlines + target Python support. |
| src/teaforge/cli.py | Adds version flag, doctor command, stable error/exit codes. |
| src/teaforge/artifacts.py | Adds atomic writer + HTML-safe JSON serializer. |
| src/teaforge/angular/parser.py | Switches to shared assembly helpers + full names. |
| src/teaforge/angular/coverage.py | Reuses Jest coverage runner wrapper. |
| src/teaforge/init.py | Bumps version to 0.2.0. |
| skill/SKILL.md | Updates skill docs for runtime evidence/sequence diagrams. |
| pyproject.toml | Adds packaging metadata, deps, package-data, tooling config. |
| MANIFEST.in | Adds explicit sdist inclusion/prune rules. |
| docs/adr/0004-bounded-external-processes.md | ADR for centralized bounded process execution. |
| docs/adr/0003-structural-javascript-evidence.md | ADR for Tree-sitter JS evidence boundary. |
| docs/adr/0002-versioned-atomic-artifacts.md | ADR for schema/versioning + atomic artifact writes. |
| docs/adr/0001-project-local-test-execution.md | ADR for project-local runners (no npx). |
| demo/jest_runtime/tests/user.test.js | Adds reproducible Jest runtime evidence demo tests. |
| demo/jest_runtime/tests/setup.cjs | Adds demo setup injecting a secret for redaction test. |
| demo/jest_runtime/src/user.js | Adds demo implementation with throw paths. |
| demo/jest_runtime/package.json | Adds locked demo Jest dependency config. |
| demo/jest_runtime/jest.config.cjs | Configures demo setupFilesAfterEnv. |
| demo/fastapi_crud/app/main.py | Updates FastAPI startup to lifespan API. |
| CONTEXT.md | Adds domain language + invariants doc. |
| CHANGELOG.md | Adds 0.2.0 changelog. |
| .gitignore | Updates ignores for coverage/node/playwright + keeps templates. |
| .github/workflows/ci.yml | Adds multi-OS CI, packaging smoke, Jest/render integrations. |
Files not reviewed (1)
- tools/render/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+222
to
+225
| result = ProcessResult( | ||
| args=normalized_command, | ||
| returncode=process.returncode, | ||
| stdout=stdout_capture.text(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Review fixes included
Validation
python -m coverage run -m pytest -q: 136 passed, 1 skippedpython -m ruff check src tests demopython -m compileall -q src teststwine checkpassednode_modulesincludedThe skipped local test is the optional PDF integration when the native WeasyPrint/Pango runtime is unavailable; CI installs and exercises that dependency on Linux.