Skip to content

docs: TestingBase conventions in patterns/testing.md (1.9.2)#39

Merged
simons-plugins merged 2 commits into
mainfrom
docs/testingbase-conventions
May 10, 2026
Merged

docs: TestingBase conventions in patterns/testing.md (1.9.2)#39
simons-plugins merged 2 commits into
mainfrom
docs/testingbase-conventions

Conversation

@simons-plugins
Copy link
Copy Markdown
Owner

Summary

Adds five real-world conventions to `patterns/testing.md` based on findings from the netro TestingBase pilot (simons-plugins/netro-indigo#58). Each one bit during the pilot — surfacing them in the skill prevents the next adoption from repeating the same time loss.

Conventions added

  1. `run_host_script` uses `return`, not `print`. `indigo-host -e` wraps the script as a function body; `print()` goes to Indigo's event log, not subprocess stdout. Upstream's own `utils.py:get_install_folder` is the canonical pattern.
  2. Plugin state is not on the HTTP API. Valid `/v2/api/indigo.` paths are devices/variables/actionGroups/controlPages/logs/triggers/schedules — no `indigo.plugins`. Plugin queries go through the IOM via `run_host_script` + `indigo.server.getPlugin()`.
  3. `/usr/local/indigo/` perms. Fresh 2025.2 installs ship `drwxrwx--- root:wheel` on this directory; regular users can't traverse it. `sudo chmod 0755 /usr/local/indigo/` is the one-time fix.
  4. Reflectors need an Indigo Server restart to activate. Until restart, `httpx` returns the public indigodomo.com "Reflector Not Found" HTML page (HTTP 200 from a reflector that isn't actually live).
  5. Local IWS is HTTP, not HTTPS. Upstream `ENV_TEMPLATE` shows `https://localhost:8176\` as default, but that gives an SSL handshake timeout. Use `http://localhost:8176\` for local-only setups, or a reflector for HTTPS.

Also adds explicit framing that TestingBase upstream is the authoritative source for TestingBase usage, separate from `/indigo:dev` which is for Indigo plugin SDK questions. Conflating those was a real time-sink in the pilot.

Version bump

1.9.1 → 1.9.2 (patch — pure docs augmentation, no new doc surface, no routing changes).

Test plan

  • CI `Check Version Bump` passes (versions match at 1.9.2, differ from main 1.9.1)
  • After merge: `/indigo:dev` surfaces the new conventions section when prompted about TestingBase / `run_host_script` / plugin state queries
  • Cross-references resolve: link to `docs/plugin-dev/api/iom/command-namespaces.md` (existing file, "Plugin Object Access" section)

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Warning

Rate limit exceeded

@simons-plugins has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 26 minutes and 28 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b5ad6d39-309d-4e10-bae4-0c989725a2ed

📥 Commits

Reviewing files that changed from the base of the PR and between 8cab261 and 892f8ac.

📒 Files selected for processing (3)
  • .claude-plugin/marketplace.json
  • .claude-plugin/plugin.json
  • docs/plugin-dev/patterns/testing.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/testingbase-conventions

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

simons-plugins and others added 2 commits May 10, 2026 10:49
Captures real-world findings from the netro pilot (first workspace
adoption of TestingBase) so future Claude sessions don't repeat them.

Five conventions added — each one bit during the pilot:

- run_host_script wraps the script as a function body; print() goes
  to Indigo's event log, not subprocess stdout. Use `return` instead.
  (Upstream's own utils.py:get_install_folder is the canonical example.)
- Plugin state isn't on the HTTP API. Indigo's /v2/api/indigo.<endpoint>
  exposes only devices/variables/actionGroups/controlPages/logs/
  triggers/schedules. Plugin queries (isEnabled, isRunning) go through
  the IOM via run_host_script + indigo.server.getPlugin().
- /usr/local/indigo/ ships as drwxrwx--- root:wheel on fresh 2025.2
  installs. Regular users can't traverse it; sudo chmod 0755 fixes.
- New reflectors need an Indigo Server restart before they're live.
  Until then httpx gets the public indigodomo.com "Not Found" page.
- Local IWS is HTTP-only on port 8176. Upstream's ENV_TEMPLATE default
  of https://localhost:8176 produces SSL handshake timeouts.

Also adds a clear pointer to TestingBase upstream as the authoritative
source for TestingBase usage (separate from /indigo:dev which is the
authoritative source for the Indigo plugin SDK). Conflating the two
caused real time-loss in the pilot — explicit guidance prevents that
for the next adoption.

Bump 1.9.1 -> 1.9.2 (patch, pure docs augmentation).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR review feedback: my first version conflated TestingBase upstream-
documented conventions with empirical findings from the netro pilot.
Restructure to make provenance explicit:

**Upstream conventions** (verified against upstream README):
1. run_host_script uses return, not print — quotes the upstream README
   directly ("return whatever value the script returns"), with code
   contrast.
2. Plugin state via IOM — quotes upstream's "useful for testing
   functions in the IOM that don't have a corresponding API method",
   plus Indigo's own authoritative endpoint list.

**Setup notes** (from real-world adoption, NOT upstream docs):
3. /usr/local/indigo/ perms — clearly framed as a finding from a
   specific fresh install; whether universal is unclear; most users
   won't hit it.
4. Reflector setup needs server restart — clearly framed as an Indigo
   Server quirk, not a TestingBase issue.
5. URL_PREFIX must match server config — REWRITTEN. The previous
   "local IWS is HTTP" claim was too absolute. Indigo can be
   configured to force HTTPS on local; the right URL_PREFIX is
   whatever your specific server is configured to accept. Three
   sub-cases documented (HTTP localhost, force-HTTPS, Reflector).

Honest provenance prevents future readers from assuming the field
notes are upstream-sanctioned. Item 5's rewrite specifically corrects
an over-confident claim that didn't account for server configuration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@simons-plugins simons-plugins force-pushed the docs/testingbase-conventions branch from c72aa66 to 892f8ac Compare May 10, 2026 09:49
@simons-plugins simons-plugins merged commit 18a083b into main May 10, 2026
3 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