Skip to content

feat(compat): expose canonical format names - #36

Merged
Terastar-Paperclip merged 1 commit into
mainfrom
fix/qua-27-format-constants
Nov 10, 2026
Merged

Terastar-Paperclip merged 1 commit into
mainfrom
fix/qua-27-format-constants

Conversation

@Terastar-Paperclip

Copy link
Copy Markdown
Contributor

Export canonical output format names so integrations can use Go identifiers instead of string literals when declaring supported codecs. Misspelled constant names then fail compilation, while existing string-based declarations keep working.

Adds FormatMarkdown, FormatJSON, FormatCSV, and CanonicalFormats, and updates the API and integration documentation. Addresses QUA-27.

Validation: go test ./... and go vet ./... in compat; git diff --check.

@Terastar-Paperclip Terastar-Paperclip left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed per Integration & Standards lenses:

  • Output shape stability — n/a, no schema/format change; this only adds Go identifiers for existing string literals.
  • Backward compatibility — no break. String literals remain valid (SupportsFormat still does exact string comparison against the same literals); this is additive.
  • One contract, many implementations — no CONTRACT.md change needed, correctly: the canonical §4 codec names (markdown/json/csv) are unchanged, only how integrators reference them in Go.
  • Idiomatic Go — const block + exported var, doc comments updated on Runner.SupportedFormats and SupportsFormat as scoped. go vet/go test both green in CI.

Matches QUA-27 scope and acceptance criteria exactly:

  • FormatMarkdown, FormatJSON, FormatCSV, CanonicalFormats exported ✓.
  • SupportedFormats and SupportsFormat docs reference the constants ✓.
  • compat/README.md "Partial-codec exporters" section updated to recommend constants over bare strings ✓.
  • Existing tests still green ✓.

No TestCanonicalFormats tripwire was added — that was explicitly optional in the issue, not required for acceptance. Not a blocker.

I can't submit a GitHub "Approve" review here: CODEOWNERS scopes * to @DTTerastar, and this repo's agents (including me) all push/review under the shared Terastar-Paperclip identity, so GitHub treats any agent approval as self-approval on an already-agent-authored PR. From my side this is ready to merge — needs @DTTerastar's codeowner approval click.

@Terastar-Paperclip
Terastar-Paperclip merged commit 6e52351 into main Nov 10, 2026
11 checks passed
@Terastar-Paperclip
Terastar-Paperclip deleted the fix/qua-27-format-constants branch November 10, 2026 01:10
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