Skip to content

Prepare the module for Adobe Commerce Marketplace submission - #2

Open
henry-mosh wants to merge 2 commits into
mainfrom
marketplace-preparation
Open

Prepare the module for Adobe Commerce Marketplace submission#2
henry-mosh wants to merge 2 commits into
mainfrom
marketplace-preparation

Conversation

@henry-mosh

Copy link
Copy Markdown
Collaborator

What

Gets Citecue_Delivery through every automated gate of the Marketplace Extension Quality Program and adds the packaging metadata and documentation the submission form requires. The validated submission ZIP builds to dist/ (gitignored); the remaining human-only steps are tracked in docs/marketplace-submission.md.

Changes

Code quality (EQP's phpcs gate)

  • Magento Coding Standard now reports 0 errors / 0 warnings (was 0/80); PHPCompatibility clean for PHP 8.1–8.4. phpcs.xml.dist added so CI can enforce the 0/0 baseline.
  • CrawlerMatcher and PathMatcher converted from static helpers to DI-injected instance classes (interceptable, Magento-idiomatic). Call sites in CrawlerRegistry and DeliveryService updated; behavior unchanged.
  • Config's pure host-allowlist statics are kept deliberately (framework-free, unit-tested SSRF validators) behind a scoped, justified phpcs:ignore region; ditto one parse_url used for log redaction.
  • Docblock/line-length cleanups across all classes and the admin template (translated phrases kept byte-identical to i18n/en_US.csv).

Test fix (pre-existing bug)

  • ConfigHostTest asserted TEST-NET-3 (203.0.113.10) is rejected as reserved, but PHP's FILTER_FLAG_NO_RES_RANGE has never covered TEST-NET ranges — the assertion failed on every PHP version. It now asserts the actual boundary (240.0.0.0/4 rejected even when allowlisted; metadata endpoint/loopback/RFC1918/0/8 remain covered by existing tests). 18/18 tests green.

Packaging & docs

  • composer.json: authors, support, homepage (the version field stays — required for Marketplace ZIP submissions).
  • New etc/di.xml: marks citecue_delivery/general/api_key as sensitive config, excluding it from app:config:dump.
  • New CHANGELOG.md (source for the portal's release-notes field); README now leads with the Marketplace install path.
  • New docs/: merchant-facing user guide + installation guide (portal accepts PDF or URL) and the submission checklist with prepared answers for likely reviewer questions (external API usage, the "cloaking" question).
  • .gitattributes/.gitignore keep dev-only files out of dist archives.

Reviewer notes

  • Verification run locally: phpcs --standard=Magento2 exit 0, PHPCompatibility 8.1–8.4 exit 0, PHPUnit 18 tests / 44 assertions, package ZIP structurally validated (composer.json + registration.php at root, names consistent, no VCS/dev files).
  • A Codex review of this diff reported no actionable regressions.
  • Please confirm two assumptions before Marketplace submission: https://citecue.com as homepage/author URL, and github.com/henry-mosh/citecue-magento/issues as the support link (taken from the README; the canonical remote is now citecue/magento2-module, so these may want updating).

🤖 Generated with Claude Code

henry-idingo and others added 2 commits August 6, 2026 15:33
Clear every gate the Marketplace Extension Quality Program runs and add
the packaging/docs the submission form requires:

- Magento Coding Standard: 0 errors, 0 warnings (was 0/80), verified
  with magento/magento-coding-standard; PHPCompatibility clean for the
  declared PHP 8.1-8.4 range. phpcs.xml.dist added for CI parity.
- Convert CrawlerMatcher and PathMatcher from static helpers to
  DI-injected instance classes (interceptable, Magento-idiomatic);
  Config's pure host-allowlist statics stay by design behind a scoped,
  justified phpcs:ignore region.
- Fix a pre-existing ConfigHostTest expectation: PHP's
  FILTER_FLAG_NO_RES_RANGE never covered TEST-NET ranges, so the
  203.0.113.10 assertion failed on every PHP version. The test now
  asserts the real boundary (240.0.0.0/4 rejected even when
  allowlisted); all 18 tests green.
- Packaging metadata: authors/support/homepage in composer.json,
  etc/di.xml marking the API key as sensitive config (excluded from
  app:config:dump), CHANGELOG.md as the release-notes source,
  Marketplace-first install instructions in the README,
  .gitattributes/.gitignore for clean dist archives.
- docs/: merchant-facing user guide and installation guide (portal
  accepts PDF or URL) plus a submission checklist covering the
  remaining Developer Portal steps and prepared reviewer answers.

The validated submission ZIP builds to dist/ (gitignored).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- DeliveryService::saveEntry now logs a warning when the cache backend
  reports a write failure via save() returning false (previously only
  thrown exceptions were logged); fail-open behavior unchanged.
- README: show the PHPCompatibility phpcs invocation alongside the
  Magento2 one so the stated 8.1-8.4 claim matches a runnable command.
- Submission doc: replace the unconditional "no customer PII" claim with
  an accurate disclosure that the crawler-requested URL (query string
  included) and crawler id are transmitted.
- Submission doc: clear the ZIP staging directory before rsync so stale
  deleted files can't ride into rebuilt packages.
- Installation guide: document that config (incl. the encrypted API key)
  survives uninstall in core_config_data, with cleanup and key-revocation
  steps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant