Skip to content

feat(smoke-test): promote validation harness into the repo (Phase 5)#54

Open
TechAlchemistX wants to merge 1 commit intomainfrom
feat/phase5-smoke-harness
Open

feat(smoke-test): promote validation harness into the repo (Phase 5)#54
TechAlchemistX wants to merge 1 commit intomainfrom
feat/phase5-smoke-harness

Conversation

@TechAlchemistX
Copy link
Copy Markdown
Owner

Summary

Phase 5 of v0.4 — extract the live-backend smoke harness that's lived in /tmp/secretenv-test/ since v0.2.0 and check it in at scripts/smoke-test/. Now reproducible by any contributor with the right cloud auth.

What's new

  • lib/common.sh — env-driven bootstrap (cloud IDs, BIN auto-detect via git rev-parse, fixture seeding with sentinel substitution, idempotent local-secrets git-init for Section 17 history tests).
  • fixtures/ — checked-in templates for local-secrets, local-registry, config.toml, project-repo. Cloud identifiers fall back to safe placeholders so --local-only works without any cloud env.
  • provision.sh / teardown.sh — env-parameterized; no more user-specific GCP project / Azure vault hardcoding.
  • run-tests.sh — three filter flags:
    • --sections N,M,P-Q — run a chosen subset (range syntax supported)
    • --local-only — shortcut for sections that need no cloud CLI
    • --list-sections — print inventory and exit
      Selective gating is implemented via a SECTION_ACTIVE flag that short-circuits run_test/assert_contains/record. The full matrix remains the default; only it gates a release tag.
  • README.md — setup walkthrough, section inventory, troubleshooting.

Cleanup

  • Replaced user-specific cargo-test path with $REPO_ROOT (derived from git rev-parse --show-toplevel).
  • All /tmp/secretenv-test/ literals replaced with ${RUNTIME_DIR} (env-overridable).
  • Section heredoc TOML configs use the same variable.

Validation

Mode Result Notes
Full live matrix (default) 336/336 Same count as v0.4 Phases 1-3 closeout
--local-only 53/53 No cloud env needed; <30s wall-clock
--sections 1,12 6/6 <2s wall-clock

Out of scope

  • Wiring release.yml to call this harness as a pre-tag gate — separate PR (Phase 5 follow-up or part of Phase 7).
  • Node 24 bump in release.yml and deny.toml AGPL tightening — separate small PRs.
  • Aggregate v0.4.0 tag — gated on Phase 7 (closing reviewer audit).

Test plan

  • bash -n scripts/smoke-test/{lib/common.sh,provision.sh,teardown.sh,run-tests.sh} parses clean
  • scripts/smoke-test/run-tests.sh --list-sections prints the 20-section table
  • scripts/smoke-test/run-tests.sh --help prints the usage banner
  • scripts/smoke-test/run-tests.sh --local-only runs 53/53 PASS with no cloud env
  • Full live matrix runs 336/336 PASS

🤖 Generated with Claude Code

Phase 5 — extract the live-backend smoke harness that has lived in
/tmp/secretenv-test/ since v0.2.0 and turn it into a checked-in,
parameterized, reproducible piece of the repo at scripts/smoke-test/.

What's new:
- lib/common.sh — shared bootstrap (env-driven cloud IDs, BIN auto-detect
  via git rev-parse, fixture seeding with @@RUNTIME_DIR@@/@@GCP_PROJECT@@
  /@@AZURE_VAULT@@ sentinel substitution, idempotent local-secrets
  git-init for Section 17 history tests).
- fixtures/ — checked-in templates for local-secrets, local-registry,
  config.toml, project-repo. Cloud identifiers fall back to safe
  placeholders (placeholder-project / placeholder-vault) so --local-only
  works without any cloud env.
- provision.sh / teardown.sh — env-parameterized. No more user-specific
  GCP project / Azure vault hardcoding. Required env: SECRETENV_TEST_
  GCP_PROJECT, SECRETENV_TEST_AZURE_VAULT.
- run-tests.sh — gains three filter flags:
    --sections N,M,P-Q   run a chosen subset (range syntax supported)
    --local-only         shortcut for sections that need no cloud CLI
    --list-sections      print the inventory and exit
  Selective gating is implemented via a SECTION_ACTIVE flag that
  short-circuits run_test/assert_contains/record. The full matrix
  remains the default; only it gates a release tag.
- README.md — setup walkthrough, section inventory, troubleshooting.

Cleanup along the way:
- Replaced the user-specific cargo-test path
  (/Users/mandeep/Workspace/secretenv/secretenv) with $REPO_ROOT,
  derived from `git rev-parse --show-toplevel` inside common.sh.
- All hardcoded /tmp/secretenv-test/ paths replaced with ${RUNTIME_DIR}.
- Section heredoc TOML configs use the same variable.

Validation: full live matrix runs 336/336 PASS (same count as v0.4
Phases 1-3 closeout). --local-only runs 53/53 PASS with no cloud env.
--sections 1,12 returns 6/6 in <2s.

Aggregate-release posture: this lands on main but the v0.4.0 tag still
requires Phase 7 (closing reviewer audit + secretenv-testing publishing
decision (decided: defer) + release.yml batch update). Not adding the
release.yml smoke gate in this PR — keeping scope tight.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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