docs: TestingBase conventions in patterns/testing.md (1.9.2)#39
Conversation
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
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>
c72aa66 to
892f8ac
Compare
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
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