Skip to content

feat(config): declare imgur and flickr credentials in the manifest - #4

Merged
mpiton merged 2 commits into
mainfrom
feat/mat-134-gallery-e2e
Jul 17, 2026
Merged

feat(config): declare imgur and flickr credentials in the manifest#4
mpiton merged 2 commits into
mainfrom
feat/mat-134-gallery-e2e

Conversation

@mpiton

@mpiton mpiton commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

MAT-134 R-01: plugin_api.rs already reads imgur_client_id and flickr_api_key through get_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_id and flickr_api_key under [config], version 1.1.0
  • Cargo.toml / Cargo.lock: version 1.1.0
  • CHANGELOG.md: created, backfilled 1.0.0 from the tag date

Testing

  • tests/manifest_config.rs (new): every config key read via get_config must be declared in plugin.toml
  • tests/wasm_smoke.rs: the get_config stub now answers per-key, and the Imgur HTTP stub rejects any request whose Authorization header isn't Client-ID <configured id> — proving the credential travels through the ABI into the provider request
  • clippy clean, WASM release build ok, 64 native tests pass

Companion PR wires gallery expansion into the host: mpiton/vortex#173

MAT-134


Summary by cubic

Declare imgur_client_id and flickr_api_key in plugin.toml so the host can validate and persist credentials. Satisfies MAT-134 R-01 and bumps the plugin to 1.1.0.

  • Bug Fixes
    • Added both keys under [config] with empty defaults, plus a test that every get_config key has a [config] declaration; scoped the check to the [config] section and matched the left-hand key to avoid false positives.
    • Extended the WASM smoke test to assert the Imgur Authorization: Client-ID <id> header is set from get_config.
    • Updated Cargo.toml/Cargo.lock and added CHANGELOG.md for 1.1.0.

Written for commit adbf1bc. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added configuration options for Imgur client ID and Flickr API access.
    • Updated the release to version 1.1.0.
  • Documentation

    • Updated release history covering versions 1.0.0 and 1.1.0.
  • Tests

    • Added checks to ensure all required configuration keys are declared in the manifest.
    • Added a smoke test that verifies the configured Imgur client ID is sent in the outgoing Authorization header.

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-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

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

Changes

Release configuration and ABI validation

Layer / File(s) Summary
Manifest configuration and release metadata
Cargo.toml, plugin.toml, CHANGELOG.md
Package and plugin versions are bumped to 1.1.0, provider configuration keys are declared, and release history is added.
Configuration and Imgur ABI validation
tests/manifest_config.rs, tests/wasm_smoke.rs
Tests verify required manifest keys and enforce propagation of imgur_client_id into the Imgur Authorization header.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding Imgur and Flickr credentials to the manifest.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 305faa6 and 65f6e7b.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • CHANGELOG.md
  • Cargo.toml
  • plugin.toml
  • tests/manifest_config.rs
  • tests/wasm_smoke.rs

Comment thread tests/manifest_config.rs Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread tests/manifest_config.rs
Comment thread tests/manifest_config.rs Outdated
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.
@mpiton
mpiton merged commit 45def9a into main Jul 17, 2026
7 checks passed
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