Skip to content

feat: better version diagnostic + auth_bypass example scaffold [INIT-2026-553]#160

Merged
SyncTekLLC merged 2 commits into
mainfrom
feat/init-2026-553-p2-p3-version-diagnostic-and-auth-bypass-example
May 26, 2026
Merged

feat: better version diagnostic + auth_bypass example scaffold [INIT-2026-553]#160
SyncTekLLC merged 2 commits into
mainfrom
feat/init-2026-553-p2-p3-version-diagnostic-and-auth-bypass-example

Conversation

@SyncTekLLC

Copy link
Copy Markdown
Contributor

Summary

Two package-side fixes from real sub-agent dogfood (INIT-2026-553).

P2 — version-pin diagnostic (commit c79796b)
A sub-agent dogfood hit `make ios-smoke` exit 3 because the monorepo Makefile pinned `0.1.0` but `1.0.0b4` was installed; opaque diagnostic forced the operator to halt + ping backend. Adds:

  • `simdrive version [--json] [--required-version VERSION]` — JSON for CI gates; `--required-version` exits 3 on mismatch with installed-vs-required side-by-side and the exact `pip install 'simdrive==X'` command.
  • `simdrive doctor [--json] [--required-version VERSION]` — CLI wrapper around `diagnostics.doctor()`; one command for "env ready AND right simdrive installed". Mismatch dominates check failures.
  • Legacy `simdrive --version` still works; transparently delegates so `--json` / `--required-version` work via the short-flag spelling too.
  • 13 new tests in `test_init_553_version_doctor_cli.py`.
  • Version bump 1.0.0b5 → 1.0.0b6 (runtime behavior change) + CHANGELOG.

P3 — auth_bypass example scaffold (commit ea5658c)
SimDrive is auth-agnostic (correct), but every recording engagement so far has reinvented the launch-arg fixture-token pattern. Ships `examples/auth_bypass/`:

  • `README.md` — the why + integration flow + driving-SimDrive snippet
  • `ios-launch-arg.swift` — `#if DEBUG` gated `SimDriveAuthInject` check with bundle-suffix defense in depth
  • `seed-dev-users.json` — fixed-UUID fixture users (member / admin / new)
  • `docker-compose.recording.yml` — backend override with 3-lock env gating, isolated tmpfs DB
  • `safety-checklist.md` — never/always lists, pre-merge review questions, leaked-token incident playbook

Not a runtime feature — pure recipe content under `examples/`.

Test plan

  • `pytest simdrive/tests -k "version or doctor or cli"` → 228 passed (+13 new vs main's 215)
  • Manual smoke: `simdrive version --json` → JSON; `--required-version X` → exit 3 with pip hint
  • Manual smoke: `simdrive doctor --json` → ok payload; `--required-version 9.9.9` → exit 3 dominates
  • Legacy `simdrive --version --json` still works (delegation verified)
  • `seed-dev-users.json` parses as valid JSON

🤖 Generated with Claude Code

DeployAtlas and others added 2 commits May 26, 2026 00:40
…ctor` with --required-version + --json [INIT-2026-553 P2]

Operator dogfood hit `make ios-smoke` exit 3 because the monorepo Makefile
pinned `0.1.0` but `1.0.0b4` was installed; the opaque diagnostic forced
the operator to halt + ping the backend team for a version bump.

Promotes the bare `--version` flag into two proper subcommands so consumer
monorepos can pin a simdrive release and get a clean diagnostic on mismatch
without scraping stderr:

- `simdrive version [--json] [--required-version VERSION]` — JSON for CI
  gates; --required-version exits 3 with installed-vs-required side-by-side
  and the exact `pip install 'simdrive==X'` to align.
- `simdrive doctor  [--json] [--required-version VERSION]` — CLI wrapper
  around diagnostics.doctor(); one command for "env ready AND right
  simdrive installed". Mismatch dominates check failures.
- Legacy `simdrive --version` delegates to the new handler so --json /
  --required-version work via the short-flag spelling too.

13 new tests in test_init_553_version_doctor_cli.py. Bumps to 1.0.0b6
(runtime behavior change). CHANGELOG entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SimDrive is auth-agnostic, which is correct — but every recording
engagement so far has reinvented the launch-arg fixture-token pattern
from scratch. Ships a canonical example scaffold so consumers have a
recipe to copy instead of a blank page.

`examples/auth_bypass/`:
- README.md            — the why + integration shape, ASCII flow,
                         driving-SimDrive snippet.
- ios-launch-arg.swift — minimal `CommandLine.arguments` +
                         `SimDriveAuthInject` check, #if DEBUG gated,
                         plus bundle-suffix defense in depth.
- seed-dev-users.json  — three fixture users with fixed UUIDs and
                         synthetic emails; member / admin / fresh-account
                         flavors for journey coverage.
- docker-compose.recording.yml — backend override: ENV=recording +
                         RECORDING_MODE=1 + AUTH_BYPASS_TOKEN +
                         isolated tmpfs DB on a recording-only network.
- safety-checklist.md  — never/always lists, pre-merge review questions,
                         and a leaked-token incident playbook.

Not a runtime feature — pure recipe content under examples/. No package
changes, no version bump implied by this commit alone (the bump was for
P2's runtime CLI behavior change).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@SyncTekLLC SyncTekLLC merged commit 4b21969 into main May 26, 2026
6 of 7 checks passed
@SyncTekLLC SyncTekLLC deleted the feat/init-2026-553-p2-p3-version-diagnostic-and-auth-bypass-example branch May 26, 2026 04:46
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