fix(tests): restore missing __init__.py in tests/plugins/platforms#42393
fix(tests): restore missing __init__.py in tests/plugins/platforms#42393teknium1 wants to merge 1 commit into
Conversation
The photon plugin tests intermittently failed CI shard 'test (2)' with 'file or directory not found: test_inbound.py' despite the file being present and '5269 passed, 0 failed' in the same run. Root cause: the package chain under tests/plugins/ was broken. Every sibling (tests/plugins/web, memory, tts, …) has an __init__.py, but tests/plugins/platforms/ and tests/plugins/platforms/photon/ were missing theirs — the photon feature PR's 'Windows footgun' cleanup commit deleted the photon one, and the platforms/ level never had one. With pytest's default prepend import mode, the broken chain makes the module's rootpath resolution depend on cwd/sys.path state the sharded per-file runner doesn't reliably reproduce, so the file resolves at plan time (--collect-only) but not at per-file exec time on whichever shard it lands. Fix: add the two empty __init__.py files so the package chain matches every sibling test package. Deterministic, no runner change needed. Validation: package chain intact tests/ → plugins/ → platforms/ → photon/; 34/34 photon tests pass through scripts/run_tests_parallel.py.
🔎 Lint report:
|
|
Closing — this fix was wrong. Adding the init.py files made the test tree importable as the dotted package 'plugins.platforms.photon', shadowing the real plugin at plugins/platforms/photon/. The plugin-interface test does importlib.import_module('plugins.platforms.photon') and resolved to the empty test init.py, so register() vanished (7 failures in test_plugin_platform_interface.py). The init.py absence was deliberate. Reverted; the original test_inbound.py collection flake needs a correct root-cause, not this. |
AGENTS.md was almost entirely how-to/mechanics with the want/don't-want
guidance implicit and scattered. Adds a single authoritative intent layer
near the top, calibrated against what actually merges and what actually
gets rejected.
- 'What Hermes Is': framing + the two properties that drive design
(prompt-cache integrity, narrow-waist core).
- 'Contribution Rubric': dual-purpose intent doc — (1) for humans/own work:
what gets merged vs rejected; (2) for the triage sweeper: when a PR is safe
to close on the three allowed reasons AND when NOT to close one. Taste-based
'won't implement / out of scope' closes stay human-only by design.
- 'What we want' calibrated against the last ~55 merges: fix real bugs well,
expand reach at the edges (platforms/channels/providers/models/desktop —
large features land routinely), refactor god-files into clean modules,
keep the CORE narrow. 'Expansive at the edges, conservative at the waist.'
- 'What we don't want': speculative hooks, .env-for-non-secrets, needless
core tools, lazy-read escape hatches, feature-destroying fixes, ungated
telemetry, change-detector tests, core-touching plugins.
- 'Before you call it a bug — verify the premise (and when NOT to close)':
distilled from real closes (#41741 intentional-design-not-a-gap, #41610
wrong-premise, #42327 fix-never-executes, #42393 deliberate-omission,
#41999 overreach). Doubles as sweeper guidance to avoid wrongly closing
legitimate PRs.
- 'The Footprint Ladder' (core-tool decision): extend > CLI+skill > gated tool
> plugin > MCP server in the catalog > new core tool (last resort).
Trim: 'Adding New Tools' intro points at the ladder. Detailed mechanics stay
where readers need them.
#42641) AGENTS.md was almost entirely how-to/mechanics with the want/don't-want guidance implicit and scattered. Adds a single authoritative intent layer near the top, calibrated against what actually merges and what actually gets rejected. - 'What Hermes Is': framing + the two properties that drive design (prompt-cache integrity, narrow-waist core). - 'Contribution Rubric': dual-purpose intent doc — (1) for humans/own work: what gets merged vs rejected; (2) for the triage sweeper: when a PR is safe to close on the three allowed reasons AND when NOT to close one. Taste-based 'won't implement / out of scope' closes stay human-only by design. - 'What we want' calibrated against the last ~55 merges: fix real bugs well, expand reach at the edges (platforms/channels/providers/models/desktop — large features land routinely), refactor god-files into clean modules, keep the CORE narrow. 'Expansive at the edges, conservative at the waist.' - 'What we don't want': speculative hooks, .env-for-non-secrets, needless core tools, lazy-read escape hatches, feature-destroying fixes, ungated telemetry, change-detector tests, core-touching plugins. - 'Before you call it a bug — verify the premise (and when NOT to close)': distilled from real closes (#41741 intentional-design-not-a-gap, #41610 wrong-premise, #42327 fix-never-executes, #42393 deliberate-omission, #41999 overreach). Doubles as sweeper guidance to avoid wrongly closing legitimate PRs. - 'The Footprint Ladder' (core-tool decision): extend > CLI+skill > gated tool > plugin > MCP server in the catalog > new core tool (last resort). Trim: 'Adding New Tools' intro points at the ladder. Detailed mechanics stay where readers need them.
NousResearch#42641) AGENTS.md was almost entirely how-to/mechanics with the want/don't-want guidance implicit and scattered. Adds a single authoritative intent layer near the top, calibrated against what actually merges and what actually gets rejected. - 'What Hermes Is': framing + the two properties that drive design (prompt-cache integrity, narrow-waist core). - 'Contribution Rubric': dual-purpose intent doc — (1) for humans/own work: what gets merged vs rejected; (2) for the triage sweeper: when a PR is safe to close on the three allowed reasons AND when NOT to close one. Taste-based 'won't implement / out of scope' closes stay human-only by design. - 'What we want' calibrated against the last ~55 merges: fix real bugs well, expand reach at the edges (platforms/channels/providers/models/desktop — large features land routinely), refactor god-files into clean modules, keep the CORE narrow. 'Expansive at the edges, conservative at the waist.' - 'What we don't want': speculative hooks, .env-for-non-secrets, needless core tools, lazy-read escape hatches, feature-destroying fixes, ungated telemetry, change-detector tests, core-touching plugins. - 'Before you call it a bug — verify the premise (and when NOT to close)': distilled from real closes (NousResearch#41741 intentional-design-not-a-gap, NousResearch#41610 wrong-premise, NousResearch#42327 fix-never-executes, NousResearch#42393 deliberate-omission, NousResearch#41999 overreach). Doubles as sweeper guidance to avoid wrongly closing legitimate PRs. - 'The Footprint Ladder' (core-tool decision): extend > CLI+skill > gated tool > plugin > MCP server in the catalog > new core tool (last resort). Trim: 'Adding New Tools' intro points at the ladder. Detailed mechanics stay where readers need them.
#42641) AGENTS.md was almost entirely how-to/mechanics with the want/don't-want guidance implicit and scattered. Adds a single authoritative intent layer near the top, calibrated against what actually merges and what actually gets rejected. - 'What Hermes Is': framing + the two properties that drive design (prompt-cache integrity, narrow-waist core). - 'Contribution Rubric': dual-purpose intent doc — (1) for humans/own work: what gets merged vs rejected; (2) for the triage sweeper: when a PR is safe to close on the three allowed reasons AND when NOT to close one. Taste-based 'won't implement / out of scope' closes stay human-only by design. - 'What we want' calibrated against the last ~55 merges: fix real bugs well, expand reach at the edges (platforms/channels/providers/models/desktop — large features land routinely), refactor god-files into clean modules, keep the CORE narrow. 'Expansive at the edges, conservative at the waist.' - 'What we don't want': speculative hooks, .env-for-non-secrets, needless core tools, lazy-read escape hatches, feature-destroying fixes, ungated telemetry, change-detector tests, core-touching plugins. - 'Before you call it a bug — verify the premise (and when NOT to close)': distilled from real closes (#41741 intentional-design-not-a-gap, #41610 wrong-premise, #42327 fix-never-executes, #42393 deliberate-omission, #41999 overreach). Doubles as sweeper guidance to avoid wrongly closing legitimate PRs. - 'The Footprint Ladder' (core-tool decision): extend > CLI+skill > gated tool > plugin > MCP server in the catalog > new core tool (last resort). Trim: 'Adding New Tools' intro points at the ladder. Detailed mechanics stay where readers need them.
Summary
Fixes the intermittent CI failure where shard
test (2)reportedfile or directory not found: tests/plugins/platforms/photon/test_inbound.pyeven though the file was present and the same run showed5269 passed, 0 failed.Root cause
The package chain under
tests/plugins/was broken. Every sibling (tests/plugins/web,memory,tts, …) carries an__init__.py, buttests/plugins/platforms/never had one andtests/plugins/platforms/photon/lost its during the photon feature PR's "Windows footgun" cleanup commit. With pytest's defaultprependimport mode, a broken__init__.pychain makes the test module's rootpath resolution depend on cwd/sys.path state that the sharded per-file runner (scripts/run_tests_parallel.py --slice N/6) doesn't reliably reproduce — so the file is enumerated at plan time (--collect-only) but not found at per-file exec time on whichever shard it lands.Changes
tests/plugins/platforms/__init__.pytests/plugins/platforms/photon/__init__.pyValidation
tests/ → plugins/ → platforms/ → photon/platforms/scripts/run_tests_parallel.py tests/plugins/platforms/photonDeterministic fix — no test-runner change required.
Infographic