Skip to content

feat: prepare TeaForge 0.2.0 beta - #1

Merged
cyberyimein merged 3 commits into
mainfrom
codex/jest-runtime-sequence-diagrams
Jul 15, 2026
Merged

feat: prepare TeaForge 0.2.0 beta#1
cyberyimein merged 3 commits into
mainfrom
codex/jest-runtime-sequence-diagrams

Conversation

@cyberyimein

@cyberyimein cyberyimein commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • add runtime-backed Jest assertion evidence with bounded output, redaction, project-local execution, and stable failure exit codes
  • replace regex-first JavaScript inference with Tree-sitter structure for JavaScript, TypeScript, and TSX
  • add file-level C0/C1 gates plus Mermaid flowchart and sequence-diagram report pages
  • add atomic/versioned artifacts, capability diagnostics, reproducible demos, package resources, and cross-platform CI
  • prepare the package and documentation for the TeaForge 0.2.0 beta

Review fixes included

  • preserve JSX/TSX grammar while analyzing extracted Jest callbacks
  • serialize embedded report JSON so test data cannot terminate the HTML script element
  • match runtime Jest evidence by full source test path to prevent collisions across duplicate file and test names

Validation

  • python -m coverage run -m pytest -q: 136 passed, 1 skipped
  • branch coverage gate: 80%
  • python -m ruff check src tests demo
  • python -m compileall -q src tests
  • real locked Jest demo: 5/5 passed
  • wheel and sdist build succeeded; twine check passed
  • packaged templates and runtime listener verified; no node_modules included

The skipped local test is the optional PDF integration when the native WeasyPrint/Pango runtime is unavailable; CI installs and exercises that dependency on Linux.

Copilot AI review requested due to automatic review settings July 15, 2026 03:46

Copilot AI 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.

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 doctor capability 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 thread src/teaforge/process.py
Comment on lines +222 to +225
result = ProcessResult(
args=normalized_command,
returncode=process.returncode,
stdout=stdout_capture.text(),
@cyberyimein
cyberyimein merged commit 63fb2b6 into main Jul 15, 2026
8 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.

2 participants