feat(adt-plugin-gcts): spec file-name grammar + full source-extension coverage

TH
13s ago
+433-45

User description

  • parseGctsFilename: .properties files get their spec grammar —
    {name}.{type}.{lang}.properties and
    {name}.{type}.{content_type}.{lang}.properties (PROG selections/
    headings/texts). Previously the 5-part shape misparsed the type
    segment into the name; every upstream example filename now parses.
  • TYPE_TO_SOURCE_EXT: full spec surface — .acds for all CDS-family
    stubs (ddla ddlx dtsc dtix dteb dtdc dras drty dsfd), .csn (csnm),
    .xdp (sfpf); .ddic + .properties recognized in parse.
  • i18n.propertiesFilename: optional content-type segment.
  • deserializer SOURCE_EXTENSIONS: acds/abdl/csn/xdp/ddic/properties so
    companion files are collected, not silently skipped.

tests/aff/filename-grammar.test.ts: 10/10 incl. whole-corpus sweep;
existing format tests 28/28 unchanged.

Divergence noted for W5: gCTS .asddls/.asdcls kept for DDLS/DCLS
(test-pinned) though upstream AFF examples uniformly use .acds.

Generated with Devin

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Stack created with GitHub Stacks CLI • Give Feedback 💬

Summary by Sourcery

Align gCTS filename handling and deserialization with the AFF specification so source files, translations, and DOCU companions round-trip correctly.

New Features:

  • Support AFF-compliant parsing and generation for translation filenames with optional content-type and language segments.
  • Recognize and generate the full set of additional AFF source formats, including CDS-family, CSNM, and SFPF files.
  • Preserve DOCU companions and .properties translations during gCTS deserialization.

Bug Fixes:

  • Correct filename partitioning so translated properties files no longer misidentify the object type or name.
  • Prevent DOCU companion metadata from overwriting the primary object metadata.

Enhancements:

  • Expand deserialization companion-file collection and bounded content loading for newly supported source and translation files.

Tests:

  • Add filename grammar coverage for upstream AFF examples, source-extension mappings, and a whole-corpus parsing sweep.

Summary by cubic

Aligns adt-plugin-gcts filename parsing, generation, and deserialization with the AFF spec grammar so every upstream example filename now parses correctly.

  • .properties files now parse per {name}.{type}.{lang}.properties and {name}.{type}.{content_type}.{lang}.properties; the 5-part shape previously misparsed the type segment into the name.
  • TYPE_TO_SOURCE_EXT adds .acds for all CDS-family types, .csn for CSNM, and .xdp for SFPF; .ddic and .properties are recognized in parsing.
  • propertiesFilename and createPropertiesFiles accept an optional content-type segment.
  • The deserializer's SOURCE_EXTENSIONS now collects .acds, .abdl, .csn, .xdp, .ddic, and .properties companion files.
  • gCTS keeps .asddls/.asdcls for DDLS/DCLS even though upstream AFF examples use .acds (test-pinned divergence).
  • Adds grammar tests for upstream example shapes plus a whole-corpus parsing sweep.

CodeAnt-AI Description

Parse AFF filenames and preserve companion files during gCTS imports

What Changed

  • Correctly parse and generate translated .properties filenames with optional content-type and language segments.
  • Recognize additional AFF source formats, including CDS-family, CSNM, and Adobe form files.
  • Preserve DOCU companions and .properties translations when importing objects, alongside their source files.

Impact

✅ Correctly parsed translated properties filenames
✅ Preserved DOCU and translation companions during gCTS imports
✅ Recognized additional AFF source files

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • New Features
    • Added support for additional source file types, including ACDS, ABDL, CSN, XDP, and DDIC.
    • Deserialized objects can now include DOCU companion content and language-specific .properties translations, with content types reflected in translation filenames.
  • Bug Fixes
    • Improved handling of companion-file read failures: affected objects are skipped while processing continues for other objects.
  • Tests
    • Expanded coverage for parsing and generating supported filename formats.