feat(adt-plugin-gcts): AFF wave-0 machinery โ€” schema access, validation, codegen, coverage

Merged
TH
8h ago
+12250-9918

Stack created with GitHub Stacks CLI โ€ข Give Feedback ๐Ÿ’ฌ


Summary by cubic

Adds AFF (ABAP File Formats) wave-0 machinery to adt-plugin-gcts: schema access and validation over the vendored abap-file-formats submodule, full codegen for all 93 schemas, and a per-type coverage report. Previously only a handful of types had generated models, with no schema validation or coverage tracking.

New Features

  • src/lib/aff/schemas.ts provides affValidate, affVersions, affExamples, affBodyProps, and version-matched example targeting (ajv 2020-12, .docu./LIMU sub-object routing), reading from the pinned submodule.
  • The aff-coverage nx target reports per-type schema versions, example fixtures, and dedicated-vs-stub handler status, with a --fail-under threshold.
  • Codegen auto-discovers every schema, emitting namespaced AffGenerated.{Type}V{n} models, including multi-version types (cfdf, sito) and companion schemas (docu, reps).
  • CI initializes the git_modules submodule on checkout so conformance tests can read the pinned schemas.
  • Schema conformance tests validate every upstream example against its official schema โ€” 92/92 root examples pass.
  • Codacy opengrep rules exclude the two AFF tooling scripts, whose repo-derived fs paths are intentionally non-literal; loops and conditionals in the machinery were refactored to clear remaining lint findings.

Migration

  • The generated barrel now exports under AffGenerated; the old flat re-export shape changed.
  • ajv is a new runtime dependency of the package.

Summary by CodeRabbit

  • New Features
    • Added access to AFF schemas, versions, examples, and generated typed models, with utilities for validating AFF JSON.
    • Added a report showing AFF schema, example, and handler coverage, with an optional threshold for failing checks.
  • Documentation
    • Updated package guidance with AFF schema and coverage workflows.
    • Added a design and staged plan for expanding AFF serialization support.
  • Chores
    • CI now checks out Git submodules, enabling workflows that rely on them.

Summary by Gitar

  • Packaging:
    • Bundles *-v{n}.json schemas into dist/aff-schemas via a tsdown onSuccess hook
    • findAffRoot prefers the bundled copy and falls back to the git_modules submodule
  • Docs:
    • Added openspec design, proposal, and tasks for full AFF coverage
    • AGENTS.md documents submodule sync and the new codegen and aff-coverage commands

This will update automatically on new commits.