Repository navigation
feat(adt-plugin-gcts): spec file-name grammar + full source-extension coverage - #234
ThePlenkov wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideAligns AFF/gCTS filename parsing, generation, and deserialization with the specification by correctly handling content-typed translation properties, recognizing the full source-extension surface, preserving DOCU and translation companions, and validating behavior against upstream examples and a corpus-wide sweep. Flow diagram for AFF/gCTS filename parsingflowchart LR
F["AFF/gCTS filename"] --> E{"Extension"}
E -->|json| M["Parse metadata name and type"]
E -->|properties| P["Parse name, type, and optional suffix"]
E -->|known source extension| S["Parse name, type, and optional suffix"]
E -->|unknown extension| U["Ignore"]
Flow diagram for typed translation propertiesflowchart LR
I["Translation entries"] --> C{"Content type provided?"}
C -->|no| L["propertiesFilename(name, type, language)"]
C -->|yes| V{"Language provided?"}
V -->|yes| T["propertiesFilename(name, type, language, contentType)"]
V -->|no| X["Throw Error"]
L --> O["name.type.language.properties"]
T --> Q["name.type.content_type.language.properties"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
✅ Deploy Preview for adt-cli canceled.
|
There was a problem hiding this comment.
Review Summary
This PR extends the gCTS/AFF filename grammar with .properties spec support, adds a full TYPE_TO_SOURCE_EXT surface for CDS-family types, and expands SOURCE_EXTENSIONS in the deserializer. The overall direction is correct, but there are four blocking defects that must be addressed before merge:
Critical Issues
-
parseGctsFilename— dot-in-name breakage (4-part and 3-part.properties) (filename.ts, lines 154–166): Both the 4-part ({name}.{type}.{lang}.properties) and 3-part ({name}.{type}.properties) branches hard-codeparts[0]/parts[1]as name and type. Any object whose name contains a dot (valid in ABAP) silently produces a wrongname/type, causing the deserializer to orphan those source files. The fix is to useparts.slice(0, -3).join('.')+parts.at(-3)(4-part) andparts.slice(0, -2).join('.')+parts.at(-2)(3-part), mirroring the existing ≥5-part branch. Comments with suggestions have been posted on each branch. -
Serializer/parser round-trip broken for
content_typesegment (i18n.ts, lines 49–52):createPropertiesFilesnever passescontentTypetopropertiesFilename, so the serializer can never emit 5-part filenames even though the parser can now read them. A corpus file with acontent_typesegment (e.g.prog.selections.en.properties) would parse with a composite suffixselections.enthat has no corresponding serializer output, making the round-trip asymmetric and breaking checkin for such objects. -
Crash on missing submodule in tests (
filename-grammar.test.ts, line 128):walk(AFF_EXAMPLES)callsreaddirSyncon a git submodule path that won't exist in a fresh CI checkout, causing a synchronousENOENTcrash that aborts the entire test suite. Add anexistsSyncguard. -
Unused import (
filename-grammar.test.ts, line 11):readFileSyncis imported but never used, which will failnoUnusedLocals/lint in CI.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 127 |
| Duplication | 4 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Secrets | Oct 24, 2026 11:33p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
13f533d to
abe7108
Compare
abe7108 to
6ca1449
Compare
|
View your CI Pipeline Execution ↗ for commit 2d554f8
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
6ca1449 to
0d8013b
Compare
0d8013b to
ffa8fd8
Compare
ffa8fd8 to
fabcddc
Compare
fabcddc to
9a150d4
Compare
9a150d4 to
2d554f8
Compare
2d554f8 to
35c194a
Compare
35c194a to
f6c7257
Compare
f6c7257 to
6335bd9
Compare
6335bd9 to
07aaf5f
Compare
bbe48e3 to
477c5fd
Compare
57a71da to
a878f0d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a878f0d7fc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="packages/adt-plugin-gcts/tests/aff/filename-grammar.test.ts" line_range="122" />
<code_context>
+ if (e.isDirectory()) walk(full);
+ else if (dir.includes('examples') && e.name.includes('.')) {
+ const p = parseGctsFilename(e.name);
+ if (!p?.type) unparsed.push(e.name);
+ }
+ }
</code_context>
<issue_to_address>
**Wrong corpus parses pass**
When the parser produces a truthy but incorrect type for example filenames, when `parseGctsFilename` returns a nonempty but incorrect type for corpus entries, the `no example filename is unparsable` test records a failure only for `!p?.type` at line 122, so even assigning every filename the same type passes the sweep.
Check parsed name, type, and extension against expected values for each corpus filename, or use a reference parser to verify the results.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and a filename-parsing mistake could attach a DOCU or translation companion to the wrong object or suffix, and a downstream import could write that content into the system. Correcting the files and importing again can repair the affected values, but reverting the parser alone would not undo an import already performed.
Blocking findings: packages/adt-plugin-gcts/tests/aff/filename-grammar.test.ts:122
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
a878f0d to
6ed5a83
Compare
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
6ed5a83 to
2f744bb
Compare
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 137 |
| Duplication | 20 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
2f744bb to
8983e52
Compare
8983e52 to
9e8b241
Compare
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
9e8b241 to
2ee66ff
Compare
2ee66ff to
d7a480d
Compare
d7a480d to
92c9afe
Compare
… coverage
- 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](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
92c9afe to
3bb5394
Compare
|



User description
{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.
stubs (ddla ddlx dtsc dtix dteb dtdc dras drty dsfd), .csn (csnm),
.xdp (sfpf); .ddic + .properties recognized in parse.
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:
.propertiestranslations during gCTS deserialization.Bug Fixes:
Enhancements:
Tests:
Summary by cubic
Aligns
adt-plugin-gctsfilename parsing, generation, and deserialization with the AFF spec grammar so every upstream example filename now parses correctly..propertiesfiles now parse per{name}.{type}.{lang}.propertiesand{name}.{type}.{content_type}.{lang}.properties; the 5-part shape previously misparsed the type segment into the name.TYPE_TO_SOURCE_EXTadds.acdsfor all CDS-family types,.csnfor CSNM, and.xdpfor SFPF;.ddicand.propertiesare recognized in parsing.propertiesFilenameandcreatePropertiesFilesaccept an optional content-type segment.SOURCE_EXTENSIONSnow collects.acds,.abdl,.csn,.xdp,.ddic, and.propertiescompanion files..asddls/.asdclsfor DDLS/DCLS even though upstream AFF examples use.acds(test-pinned divergence).Written for commit f6c7257. Summary will update on new commits.
CodeAnt-AI Description
Keep AFF translations and companion files intact during gCTS imports
What Changed
.propertiesfilenames with content type and language are parsed and generated with the correct object name and type.Impact
✅ Correct object names for translated properties files✅ Translation and DOCU companions retained on import✅ CDS, CSNM, and Adobe form sources included in imports💡 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:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
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:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
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.