molecule-ai-workspace-templ.../tests
Hongming Wang 227787bbbd
Some checks failed
CI / validate (push) Failing after 0s
CI / Adapter unit tests (push) Failing after 6s
test: bash coverage for entrypoint.sh log_boot_context()
The Python adapter audit (test_adapter_logging.py) pins the
adapter.py side, but the entrypoint shell function fires earlier and
twice (pre-gosu + post-gosu). When the SDK import wedge keeps the
adapter from running at all, the shell emission is the operator's
only visibility into the boot env.

Eight new tests cover:
- env NAME=set / env NAME=unset shape for every audited var
- value-leak guard: secret strings never appear in output
- WORKSPACE_ID + PLATFORM_URL passthrough by value (not secret)
- <unset> fallback for missing platform identifiers
- uid/gid line shape (used to verify the privilege drop)
- dated boot banner shape (used to count restarts in a crash loop)
- cross-file gate: shell for-loop names == fixture tuple, mirroring
  test_audit_env_list_matches_entrypoint_sh's adapter.py↔shell gate

Strategy: regex-extract the function body from entrypoint.sh and run
it in a fresh /bin/sh with controlled env. We never source the whole
entrypoint because it would chown /workspace and exec molecule-runtime.

Closes the gap from task #251 (follow-up to PR #32 boot-debug logging).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 22:26:35 -07:00
..
pytest.ini feat(adapter): pre-validate ANTHROPIC_BASE_URL + missing model combo 2026-04-30 22:35:49 -07:00
test_adapter_logging.py feat(adapter,entrypoint): boot env audit + crash-loop diagnosis logging 2026-05-02 21:41:05 -07:00
test_adapter_prevalidate.py fix(adapter): keep setup() routing — strip prefix only at CLI invocation 2026-05-01 16:46:54 -07:00
test_dev_channels_flag.py fix(executor): pass tagged server:molecule to dev-channels flag 2026-05-01 17:15:49 -07:00
test_entrypoint_boot_context.py test: bash coverage for entrypoint.sh log_boot_context() 2026-05-02 22:26:35 -07:00
test_provider_routing.py feat: per-vendor env routing for third-party providers (task #244) 2026-05-02 22:20:03 -07:00
test_runtime_wedge_mirror.py chore(executor): runtime_wedge mirror follow-ups from PR #29 review 2026-05-01 18:04:24 -07:00