feat(config): declare imgur and flickr credentials in the manifest - #4
Conversation
plugin_api.rs already reads imgur_client_id and flickr_api_key via get_config, but the manifest never declared them, so the host had nothing to validate or persist. Declare both with empty defaults and bump to 1.1.0. Two tests pin the contract: manifest_config checks every key the plugin reads is declared, and the ABI smoke test now asserts a configured client id reaches the Imgur Client-ID header. MAT-134
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
📝 WalkthroughWalkthroughThe release is updated to version 1.1.0, adding Imgur and Flickr configuration declarations. Manifest coverage and WASM smoke tests now verify configuration keys and propagation of the Imgur client ID into the authorization header. ChangesRelease configuration and ABI validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/manifest_config.rs`:
- Line 8: Update the array in the test loop to rustfmt’s multi-line formatting,
placing each key on its own line so cargo fmt --all -- --check passes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3ecd70ec-6115-46d7-ae48-8addcc574f28
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
CHANGELOG.mdCargo.tomlplugin.tomltests/manifest_config.rstests/wasm_smoke.rs
There was a problem hiding this comment.
cubic analysis
All reported issues were addressed across 6 files
Linked issue analysis
Linked issue: MAT-134: [Lot 2] Intégrer le plugin Gallery de bout en bout
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | R-01 — The Imgur/Flickr configuration keys are declared, validated, and accessible via get_config | plugin.toml adds imgur_client_id and flickr_api_key; tests/manifest_config.rs asserts every key read by the plugin is declared; tests/wasm_smoke.rs verifies the configured Imgur client id is returned by get_config and appears in the Imgur Authorization header (proving the credential travels through the ABI). The PR summary also cites MAT-134 R-01. |
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
A key mentioned in a description string elsewhere in plugin.toml could satisfy the old full-file contains check. Match the key as the left-hand side of a declaration line after the [config] header, and let rustfmt expand the key array so cargo fmt --check passes.
Summary
MAT-134 R-01:
plugin_api.rsalready readsimgur_client_idandflickr_api_keythroughget_config, but the manifest never declared them, so the host had nothing to validate or persist. This declares both keys with empty-string defaults and bumps the plugin to 1.1.0.Changes
plugin.toml:imgur_client_idandflickr_api_keyunder[config], version 1.1.0Cargo.toml/Cargo.lock: version 1.1.0CHANGELOG.md: created, backfilled 1.0.0 from the tag dateTesting
tests/manifest_config.rs(new): every config key read viaget_configmust be declared inplugin.tomltests/wasm_smoke.rs: theget_configstub now answers per-key, and the Imgur HTTP stub rejects any request whoseAuthorizationheader isn'tClient-ID <configured id>— proving the credential travels through the ABI into the provider requestCompanion PR wires gallery expansion into the host: mpiton/vortex#173
MAT-134
Summary by cubic
Declare
imgur_client_idandflickr_api_keyinplugin.tomlso the host can validate and persist credentials. Satisfies MAT-134 R-01 and bumps the plugin to 1.1.0.[config]with empty defaults, plus a test that everyget_configkey has a[config]declaration; scoped the check to the[config]section and matched the left-hand key to avoid false positives.Authorization: Client-ID <id>header is set fromget_config.Cargo.toml/Cargo.lockand addedCHANGELOG.mdfor 1.1.0.Written for commit adbf1bc. Summary will update on new commits.
Summary by CodeRabbit
New Features
Documentation
Tests