fix: resolve main merge conflict and eliminate SonarQube duplication#88
fix: resolve main merge conflict and eliminate SonarQube duplication#88ThePlenkov merged 5 commits intomainfrom
Conversation
|
View your CI Pipeline Execution ↗ for commit 86df899
☁️ Nx Cloud last updated this comment at |
- Delete openspec/specs/oat/ directory (6 spec files) - Remove OatConfig type, change default format to 'abapgit' in config - Remove oat shortcut from format-loader.ts FORMAT_SHORTCUTS - Update import/export command descriptions and default formats - Delete mock-oat-plugin.ts testing file - Update e2e tests to use abapgit format - Update all README.md, docs, openspec, and .windsurf/rules files Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
| name: '@abapify/adt-plugin-abapgit', | ||
| config: { | ||
| enabled: true, | ||
| options: { | ||
| fileStructure: 'hierarchical', | ||
| includeMetadata: true, | ||
| }, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| defaults: { | ||
| format: 'oat', | ||
| format: 'abapgit', |
There was a problem hiding this comment.
🔴 Default config format name mismatch causes validation failure
The getDefault() method specifies plugin name @abapify/adt-plugin-abapgit with default format abapgit. However, the validation logic at packages/adt-cli/src/lib/config/loader.ts:94-97 (and identically at packages/adt-cli/src/lib/config/validation.ts:130-133) derives available format names by stripping only the @abapify/ prefix: p.name.replace('@abapify/', ''). For @abapify/adt-plugin-abapgit this produces adt-plugin-abapgit, which does not match the default format string abapgit. As a result, any user config file following the documented pattern (plugin @abapify/adt-plugin-abapgit with defaults.format: 'abapgit') would fail validation with "Default format 'abapgit' is not in configured plugins". The old config used @abapify/oat which stripped to oat, correctly matching the old default. The tests mask this because they use @abapify/abapgit (not the real package name) which strips correctly to abapgit.
Prompt for agents
The default format name 'abapgit' does not match what the validation logic derives from the plugin name '@abapify/adt-plugin-abapgit' (which produces 'adt-plugin-abapgit' after stripping '@abapify/'). You need to fix this in two ways:
1. In packages/adt-cli/src/lib/config/loader.ts line 133, change the defaults.format from 'abapgit' to 'adt-plugin-abapgit' to match the stripped plugin name. OR update the validation logic in loader.ts lines 94-95 and validation.ts lines 130-131 to also consider short-name aliases (e.g. use the FORMAT_SHORTCUTS map from format-loader.ts for reverse lookup).
2. Fix the same mismatch in the tests at packages/adt-cli/src/lib/plugins/mock-e2e.test.ts where MockAbapGitPlugin uses name '@abapify/abapgit' but the real plugin is '@abapify/adt-plugin-abapgit'. The test configs should use the actual package name to properly validate.
Was this helpful? React with 👍 or 👎 to provide feedback.
| │ • GitLab Format │ │ • Console Output │ │ • abapGit Format│ | ||
| │ • GitHub Format │ │ • JSON Reports │ │ • abapGit Format│ |
There was a problem hiding this comment.
🟡 Duplicate 'abapGit Format' entry in CI/CD pipeline spec diagram
When replacing OAT Format with abapGit Format at line 68, a duplicate was introduced because line 69 already contained abapGit Format. The ASCII diagram now lists abapGit Format twice in the serialization output column.
| │ • GitLab Format │ │ • Console Output │ │ • abapGit Format│ | |
| │ • GitHub Format │ │ • JSON Reports │ │ • abapGit Format│ | |
| │ • GitLab Format │ │ • Console Output │ │ • abapGit Format│ | |
| │ • GitHub Format │ │ • JSON Reports │ │ • Custom Formats│ |
Was this helpful? React with 👍 or 👎 to provide feedback.
Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Removes the unimplemented OAT format across the CLI/export tooling and documentation, making abapGit the default format plugin and reducing duplicated import/export logic.
Changes:
- Removed OAT references/specs and updated docs/examples to abapGit as the canonical/default format.
- Updated CLI/export command defaults and help text to use
abapgit/@abapify/adt-plugin-abapgit(and addedagshortcut in the CLI loader). - Refactored/DRY’d import error handling and package-path resolution; simplified E2E tests accordingly.
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/adt-plugin/src/types.ts | Removes OAT from plugin interface docs/examples. |
| packages/adt-plugin/README.md | Updates plugin contract description to drop OAT. |
| packages/adt-export/src/types.ts | Updates format option docs to abapGit plugin identifiers. |
| packages/adt-export/src/commands/export.ts | Switches CLI default format/help text to abapGit. |
| packages/adt-export/package.json | Drops OAT keyword metadata. |
| packages/adt-export/README.md | Updates usage/examples and supported formats to abapGit only. |
| packages/adt-cli/src/lib/utils/format-loader.ts | Removes OAT shortcut/loading path; bundles abapGit and adds ag alias. |
| packages/adt-cli/src/lib/utils/command-helpers.ts | Extracts shared handleImportError() for import commands. |
| packages/adt-cli/src/lib/testing/mock-oat-plugin.ts | Deletes mock OAT plugin used for previous E2E coverage. |
| packages/adt-cli/src/lib/testing/e2e-transport-import.test.ts | Refactors transport import E2E tests to abapGit and shared helper. |
| packages/adt-cli/src/lib/services/import/service.ts | Extracts resolvePackagePath() to module scope to reduce duplication. |
| packages/adt-cli/src/lib/plugins/mock-e2e.test.ts | Removes mock OAT plugin usage and updates expectations to single default format. |
| packages/adt-cli/src/lib/plugins/interfaces.ts | Removes OAT from format plugin interface docs. |
| packages/adt-cli/src/lib/config/types.ts | Replaces OAT-specific config typing with extensible base config typing. |
| packages/adt-cli/src/lib/config/loader.ts | Updates default config to @abapify/adt-plugin-abapgit + abapgit default. |
| packages/adt-cli/src/lib/commands/import/transport.ts | Updates format option help + uses shared handleImportError(). |
| packages/adt-cli/src/lib/commands/import/package.ts | Updates format option help + uses shared handleImportError(). |
| packages/adt-cli/src/lib/cli.ts | Removes OAT mention from command description. |
| packages/adt-cli/README.md | Updates examples/defaults to abapGit. |
| packages/adt-cli/AGENTS.md | Updates format-loader reference example to abapGit plugin package. |
| openspec/specs/oat/spec.md | Removes OAT spec (domain removed). |
| openspec/specs/oat/project-structure.md | Removes OAT spec content. |
| openspec/specs/oat/metadata-schema.md | Removes OAT spec content. |
| openspec/specs/oat/format-structure.md | Removes OAT spec content. |
| openspec/specs/oat/format-comparison.md | Removes OAT spec content. |
| openspec/specs/oat/adt-cli-integration.md | Removes OAT spec content. |
| openspec/specs/cicd/abap-cicd-pipeline.md | Updates pipeline examples/diagrams to abapGit. |
| openspec/specs/adt-cli/spec.md | Updates end-to-end examples and “canonical format” wording to abapGit. |
| openspec/specs/adt-cli/plugin-architecture.md | Updates plugin package references/defaults to @abapify/adt-plugin-abapgit. |
| openspec/specs/adk/spec.md | Updates “With … Format” wording to abapGit. |
| openspec/specs/adk/intelligent-object-factory.md | Renames OAT plugin example to abapGit plugin example. |
| docs/planning/roadmap.md | Updates roadmap items to abapGit (removes OAT). |
| docs/planning/current-sprint.md | Updates sprint notes/checklist to abapGit terminology. |
| docs/planning/abap-code-review.md | Updates planning doc dependencies/success metrics to abapGit. |
| docs/examples/intelligent-adk-usage.md | Updates example plugin naming/comments to abapGit. |
| docs/design/export-architecture.md | Removes OAT example and updates remaining flow/docs to abapGit. |
| docs/architecture/plugin-system.md | Updates plugin-system narrative/flow to abapGit. |
| docs/architecture/adk-overview.md | Updates architecture diagram label to @abapify/adt-plugin-abapgit. |
| docs/README.md | Removes OAT domain from docs tree. |
| AGENTS.md | Removes OAT domain from spec-domain listing. |
| .windsurf/rules/tmp-folder-testing.md | Updates tmp-folder testing commands to use abapGit format. |
| .windsurf/rules/spec-first-then-code.md | Removes OAT from spec domain list. |
| .windsurf/rules/nx-monorepo-setup.md | Updates plugin-generator example away from OAT naming. |
Comments suppressed due to low confidence (1)
openspec/specs/adt-cli/plugin-architecture.md:200
- This spec’s “Plugin loading failed” example still tells users to run
npm install ..., but the repo’s package-manager convention is bun (bun add .../bunx ...). To keep docs consistent with the rest of the PR, update the installation command in this example accordingly.
# Plugin loading failed
❌ Failed to load format plugin: Package '@company/missing' not found. Install it with: npm install @company/missing
</details>
---
You can also share your feedback on Copilot code review. [Take the survey](https://www.surveymonkey.com/r/XP6L3XJ).
| const FORMAT_SHORTCUTS: Record<string, string> = { | ||
| oat: '@abapify/oat', | ||
| abapgit: '@abapify/adt-plugin-abapgit', | ||
| ag: '@abapify/adt-plugin-abapgit', | ||
| }; |
| plugins: { | ||
| formats: [{ name: '@abapify/oat' }, { name: '@abapify/abapgit' }], | ||
| formats: [{ name: '@abapify/abapgit' }], | ||
| }, |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|



Branch was behind
main(PR #87 bun/bunx docs update) and the quality gate was failing at 38% duplication on new code (threshold: 3%).Merge conflict
.windsurf/rules/nx-monorepo-setup.md: keptcustom-formatexample (OAT removed) + adoptedbunxprefix from mainDuplication fixes
Shared error handler — identical 35-line
catchblock inimport/package.tsandimport/transport.tsextracted tohandleImportError()inutils/command-helpers.ts:resolvePackagePath— function was defined inline inside bothimportTransport()andimportPackage()inservice.ts; promoted to module-level.E2E test — repeated
createMockAdtClient()+executeCli()boilerplate extracted into arunTransportImport()helper; also fixed a duplicate test name ("should successfully configure transport import with format option"appeared twice).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://storage.googleapis.com/prod-north-america/69ab0980542defed8d2aa8f4/59088ecc-2ae1-47b7-bd97-cf08f83fb74d/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/adt-cli/adt-cli/node_modules/.bin/nx build adt-cli --no�� --noprofile -c /usr/bin/gh(http block)https://storage.googleapis.com/prod-north-america/69ab0980542defed8d2aa8f4/7c674b3d-a165-4c1e-83c2-f7db85837027/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/adt-cli/adt-cli/node_modules/.bin/nx build adt-cli --no�� --noprofile -c /usr/bin/gh(http block)https://storage.googleapis.com/prod-north-america/69ab0980542defed8d2aa8f4/8f54da2e-63a4-4b8a-bfad-532af604d86d/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/adt-cli/adt-cli/node_modules/.bin/nx lint adt-cli x/sr�� lligent-object-factory.md t bin/node 7206 -c odules/npm/node_f17844d672b112afbc4116c61f8e715a525f6a6d:packages/adt-cli/src/lib/plugins/interfaces.ts ps bin/�� .md --no-headers 0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node 7511 git de_modules/.bin/f17844d672b112afbc4116c61f8e715a525f6a6d:packages/adt-export/src/types.ts ps(http block)https://storage.googleapis.com/prod-north-america/69ab0980542defed8d2aa8f4/8f54da2e-63a4-4b8a-bfad-532af604d86d-logs/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/adt-cli/adt-cli/node_modules/.bin/nx lint adt-cli x/sr�� lligent-object-factory.md t bin/node 7206 -c odules/npm/node_f17844d672b112afbc4116c61f8e715a525f6a6d:packages/adt-cli/src/lib/plugins/interfaces.ts ps bin/�� .md --no-headers 0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node 7511 git de_modules/.bin/f17844d672b112afbc4116c61f8e715a525f6a6d:packages/adt-export/src/types.ts ps(http block)https://storage.googleapis.com/prod-north-america/69ab0980542defed8d2aa8f4/b48c29fc-5344-44bc-b83b-410493c50bca-logs/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/adt-cli/adt-cli/node_modules/.bin/nx typecheck adt-cli -c "tsdown" bash in/node --noprofile -c(http block)https://storage.googleapis.com/prod-north-america/69ab0980542defed8d2aa8f4/c07aa82d-e4a4-420e-b962-37e24b126593-logs/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/adt-cli/adt-cli/node_modules/.bin/nx build adt-cli i/no�� "tsdown" sleep /home/REDACTED/node_modules/.bin/sh dt-cli/actions/rinfocmp(http block)https://storage.googleapis.com/prod-north-america/69ab0980542defed8d2aa8f4/cec108fb-b576-4dd6-a38a-59bb5e3e8c3e/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/adt-cli/adt-cli/node_modules/.bin/nx build adt-cli --no�� --noprofile -c /usr/bin/gh(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.