Skip to content

fix: resolve main merge conflict and eliminate SonarQube duplication#88

Merged
ThePlenkov merged 5 commits intomainfrom
copilot/remove-oat-format-everywhere
Mar 16, 2026
Merged

fix: resolve main merge conflict and eliminate SonarQube duplication#88
ThePlenkov merged 5 commits intomainfrom
copilot/remove-oat-format-everywhere

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

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: kept custom-format example (OAT removed) + adopted bunx prefix from main

Duplication fixes

Shared error handler — identical 35-line catch block in import/package.ts and import/transport.ts extracted to handleImportError() in utils/command-helpers.ts:

// before: 35 lines of error dissection duplicated in each command
} catch (error) {
  const errorMsg = error instanceof Error ? error.message : String(error);
  const errorCode = error instanceof Error && 'code' in error ? (error as any).code : 'UNKNOWN';
  // ...
}

// after
} catch (error) {
  handleImportError(error);
}

resolvePackagePath — function was defined inline inside both importTransport() and importPackage() in service.ts; promoted to module-level.

E2E test — repeated createMockAdtClient() + executeCli() boilerplate extracted into a runTransportImport() 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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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.


Open with Devin

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Mar 16, 2026

View your CI Pipeline Execution ↗ for commit 86df899

Command Status Duration Result
nx affected -t lint test build e2e-ci --verbose... ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-16 15:48:43 UTC

- 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>
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 3 potential issues.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment on lines +125 to +133
name: '@abapify/adt-plugin-abapgit',
config: {
enabled: true,
options: {
fileStructure: 'hierarchical',
includeMetadata: true,
},
},
},
],
},
defaults: {
format: 'oat',
format: 'abapgit',

Choose a reason for hiding this comment

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

🔴 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.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +68 to 69
│ • GitLab Format │ │ • Console Output │ │ • abapGit Format│
│ • GitHub Format │ │ • JSON Reports │ │ • abapGit Format│

Choose a reason for hiding this comment

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

🟡 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.

Suggested change
│ • GitLab Format │ │ • Console Output │ │ • abapGit Format│
│ • GitHub Format │ │ • JSON Reports │ │ • abapGit Format
│ • GitLab Format │ │ • Console Output │ │ • abapGit Format│
│ • GitHub Format │ │ • JSON Reports │ │ • Custom Formats
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@ThePlenkov ThePlenkov marked this pull request as ready for review March 16, 2026 15:37
Copilot AI review requested due to automatic review settings March 16, 2026 15:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 added ag shortcut 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).

Comment on lines 14 to 17
const FORMAT_SHORTCUTS: Record<string, string> = {
oat: '@abapify/oat',
abapgit: '@abapify/adt-plugin-abapgit',
ag: '@abapify/adt-plugin-abapgit',
};
Comment on lines 112 to 114
plugins: {
formats: [{ name: '@abapify/oat' }, { name: '@abapify/abapgit' }],
formats: [{ name: '@abapify/abapgit' }],
},
Copy link
Member

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copilot AI changed the title Remove unimplemented OAT format; make abapgit the default fix: resolve main merge conflict and eliminate SonarQube duplication Mar 16, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link

@ThePlenkov ThePlenkov merged commit cace890 into main Mar 16, 2026
4 of 5 checks passed
@ThePlenkov ThePlenkov deleted the copilot/remove-oat-format-everywhere branch March 16, 2026 15:52
Copilot AI requested a review from ThePlenkov March 16, 2026 15:52
Copilot stopped work on behalf of ThePlenkov due to an error March 16, 2026 15:52
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.

3 participants