Repository navigation
A patch release on top of v4.0.1 covering server access gates, default loopback Host header checks, adapter and journal fixes, and conformance tests. Review the loopback Host header change below before upgrading if a reverse proxy, tunnel, or container alias fronts a loopback-bound server.
Loopback Host header guard and GUI bearer token
Loopback-bound servers (127.0.0.1, localhost, or ::1) enable the Host header guard by default across bernstein gui serve (without --tunnel), bernstein serve, and bernstein run, rejecting non-loopback Host headers (anything outside localhost, localhost.localdomain, 127.0.0.0/8, or ::1) with HTTP 403 or WebSocket close code 1008 (#8181). Set BERNSTEIN_ALLOWED_HOSTS to a comma-separated list of permitted hostnames when a reverse proxy, tunnel, or container alias forwards a non-loopback Host header. On loopback binds (--no-open and --dev included, without --tunnel), bernstein gui serve persists the auto-minted GUI API bearer token to .sdd/runtime/auth.token (0600) when .sdd/ exists and reuses it across launches instead of rotating on every start (non-loopback and --tunnel binds never auto-mint); bernstein run surfaces .sdd/runtime/auth.token in bootstrap output while minting a fresh per-run token when BERNSTEIN_AUTH_TOKEN is unset.
Server gates and file permissions
WebSocket handshakes to /ws and /api/v1/ws traverse the same authentication, IP allowlist, and request-limit middleware as HTTP GET, returning 401, 403, or 429 on rejection and requiring Authorization: Bearer on the handshake (#8150). POST /a2a/v1/oauth/token (and its /api/v1 alias) shares the login attempt budget and failed-credential backoff, and POST /a2a/v1 applies backoff to invalid API keys and bearer tokens without counting successful calls (#8151). The SSE reconnect limiter counts /api/v1/events, /api/v1/events/cost, and /api/v1/events/thread against the same per-client budget as canonical routes (#8152). Dashboard task log streams read new lines on a worker thread, and ticket validation reuses the current schema validator including date checks (#7643).
write_atomic_bytes stages files at 0o600, validates wider explicit modes before applying them, and rejects group/world-writable or special-bit modes (0o022 or outside 0o777); ScheduleStore and ScheduleSupervisor write specs and receipts at 0o600 instead of 0o666, a2a_cmd._reissue_expired_card clamps preserved modes to 0o644, and volunteer preflight enforces anchored HTTPS github.com/<owner>/<repo>[.git] URLs via ensure_public_http_url and StrictHTTPRedirectHandler (#8160).
Runtime, adapters, CLI, and tests
GeminiAdapter sets default_model = "gemini-3-flash" so zero-config and bernstein demo --real --adapter gemini runs avoid ModelNotConfiguredError (#8154). Gateway-only retry resolution skips the Claude tier ladder on non-Claude adapters (OPENAI_API_BASE or non-Claude role_model_policy), leaving bare sonnet/opus/haiku labels unset while keeping explicit pins, metadata.pinned_model, provider-prefixed models, and the Claude ladder unchanged (#6605). Task journal replay preserves claim timestamps and claimants on pending stops unless explicitly set to null (#7952). bernstein demo and bernstein demo --flask-todo seeds declare quality_gates: {enabled: false} so bernstein trace export computes policy.bundle_hash out of the box (#8159). bernstein wiki build keeps Unicode Python filenames and groups top-level src/ modules together (#7902). The auditor conformance suite covers all 21 registered questions with authority (#5059) and data/endpoint (#5061) vectors (asked 21/21, answered 4/21) (#5054), and tests/unit/test_orchestrator.py pins per-test thread and RSS teardown budgets (#6042).
Upgrading
pipx upgrade bernstein # or: uv tool upgrade bernsteinConfigure BERNSTEIN_ALLOWED_HOSTS before upgrading if a reverse proxy, tunnel, or container alias fronts a loopback server. No configuration file migration is required.
What's Changed
- docs(governance): state where the maintainer plans and what stays public by @chernistry in #7803
- ci(pulse): run project-pulse on demand instead of weekly schedule by @chernistry in #8145
- docs(governance): end the temporary merge rule (23 November) by @chernistry in #7768
- Include Unicode filenames in the generated repository wiki. by @chernistry in #8004
- fix(server): apply the SSE reconnect limit to versioned aliases by @chernistry in #8152
- fix(auth): apply attempt limits to A2A credential endpoints by @chernistry in #8151
- fix(runtime): harden local execution, cache serialization, and request boundaries by @chernistry in #8153
- fix(gemini): declare default_model on GeminiAdapter for zero-config and demo runs by @chernistry in #8154
- chore(deps): update dependency pymdown-extensions to v13.1 by @renovate[bot] in #8129
- fix(server): apply HTTP access gates to WebSocket handshakes by @chernistry in #8150
- fix(demo): declare quality_gates policy in demo/quickstart seeds for trace export by @chernistry in #8159
- fix(security): harden atomic_write modes and volunteer GitHub preflight URLs by @chernistry in #8160
- test(orchestrator): pin per-test thread and RSS process budget (#6042) by @chernistry in #8148
- fix(security): use Path.chmod after 0600 staging and tighten catalog cache mode by @chernistry in #8161
- test(adapters): make cross-platform builtin tests portable on Windows (#5787) by @chernistry in #8149
- fix(cluster): check registered worker health on claim-by-ID (#7853) by @chernistry in #8156
- fix(worker): deliver pushed branch, sync run base, and check repo identity (#6538) by @chernistry in #8157
- fix(lifecycle): skip Claude tier ladder on non-Claude retry adapters (#6605) by @chernistry in #8158
- chore(deps): update dependency postcss to v8.5.33 by @renovate[bot] in #8128
- Bump croniter from 6.2.4 to 7.0.0 by @dependabot[bot] in #8136
- Bump syrupy from 6.1.1 to 7.0.2 by @dependabot[bot] in #8138
- Bump websockets from 16.1.1 to 17.4 by @dependabot[bot] in #8139
- chore(deps): bump watchdog from 6.0.0 to 7.1.0 by @dependabot[bot] in #7720
- chore(deps): update actions/dependency-review-action action to v5.0.1 by @renovate[bot] in #8155
- chore(deps): update dependency astral-sh/uv to v0.13.9 by @renovate[bot] in #7946
- chore(ci): ratchet coverage baseline up to 85.67% by @chernistry in #7953
- docs: regenerate adapter last-green table from canary receipts by @chernistry in #8104
- chore(deps): update dependency node to v26 by @renovate[bot] in #8130
- Demonstrate snapshots across linked Git worktrees. by @chernistry in #8007
- Ignore extended ANSI color operands in the log viewer. by @chernistry in #7976
- feat(templates): expand workspace and packaged scenarios, workflows, and team manifests by @chernistry in #8169
- docs: surface plugins and org-kit in README/community and retire stale docs blog by @chernistry in #8166
- feat(templates): add AI-governance, FinOps, data-migration, and DR scenarios, workflows, and teams by @chernistry in #8173
- fix(templates): address all 7 #8173 review findings (DR teardown, scenario deps, rework re-verify, docs) by @chernistry in #8175
- fix(init): align seed_parser internal_llm_provider default and init --wizard YAML by @chernistry in #8178
- fix(demo): ship demo tests in wheel and fix mock config/rate-limit/summary by @chernistry in #8176
- fix(cli): fail fast before cost preview and plan confirmation without CLI adapter by @chernistry in #8179
- chore(deps): update dependency filelock to v4.2.12 by @renovate[bot] in #8162
- test(security): make PII linearity check deterministic via operation counts by @chernistry in #8180
- chore(deps): update dependency platformdirs to v4.14.7 by @renovate[bot] in #8167
- chore(deps): update dependency pipx to v1.18.19 by @renovate[bot] in #8165
- Bump types-pyyaml from 6.0.12.20261103 to 6.0.12.20261113 by @dependabot[bot] in #8137
- Bump types-psutil from 7.2.2.20260906 to 7.2.2.20261111 by @dependabot[bot] in #8135
- docs(i18n): translate always_run workflow cleanup sentence across all 23 READMEs by @chernistry in #8188
- fix(cli): make doctor read-only, context-aware, and accurate by @chernistry in #8184
- chore(deps): update ossf/scorecard-action action to v2.6.0 by @renovate[bot] in #8187
- Preserve worker claims across task journal replay by @chernistry in #7952
- fix(gui): auto-mint and scope loopback API bearer across CLI and run boot by @chernistry in #8181
- Read task logs off the event loop and reuse ticket validators by @chernistry in #7868
- test(conformance): complete all 21 auditor conformance vectors in live suite by @chernistry in #7677
- gui: add monitor-only banner and CLI empty state when no runner is attached by @chernistry in #8186
- chore(release): v4.0.2 by @chernistry in #8192
Full Changelog: v4.0.1...v4.0.2