Skip to content

feat: wrap API payload in metadata envelope (Story 1.6)#8

Merged
maximn merged 1 commit into
mainfrom
feat/1-6-action-metadata-envelope
Mar 15, 2026
Merged

feat: wrap API payload in metadata envelope (Story 1.6)#8
maximn merged 1 commit into
mainfrom
feat/1-6-action-metadata-envelope

Conversation

@maximn
Copy link
Copy Markdown
Contributor

@maximn maximn commented Mar 14, 2026

Summary

  • Restructure API payload from flat { summary, suites, repository, git, ciRunId } to envelope { meta, results } format
  • Add framework auto-detection: CTRF uses tool.name, JUnit uses file-path heuristics (vitest, jest, pytest, maven-surefire)
  • Add optional test-job-name action input for overriding the display name in TestGlance
  • meta includes workflow and job from GITHUB_WORKFLOW / GITHUB_JOB env vars

Test plan

  • 193 tests passing (34 new, 0 regressions from 159 baseline)
  • pnpm test — all pass
  • pnpm lint — clean
  • pnpm typecheck — clean
  • pnpm build — dist rebuilt
  • Coordinate with Story 3.6 (SaaS API must accept envelope format before Action release)

Note

After this ships, the SaaS API's Zod schema will reject the new payload format. Story 3.6 must be deployed first to add backward-compatible envelope support.

Restructure the API payload from flat format to `{ meta, results }`
envelope. The `meta` object includes workflow/job names from GitHub
Actions env vars, optional framework auto-detection, and an optional
`test-job-name` action input for display name overrides.

- Add MetaEnvelope interface, restructure ApiPayload to envelope format
- Add detectFramework() with CTRF tool-name and JUnit path heuristics
- Expose toolName from CTRF parser in ParsedTestRun
- Add test-job-name optional input to action.yml
- 34 new tests (193 total), 0 regressions
@maximn maximn merged commit f0dc95d into main Mar 15, 2026
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