bun test v1.4.4 (38afee6c8)
$ bun test student-tests/security-guards.test.ts student-tests/kv-secrets.test.ts student-tests/public-endpoint.test.ts student-tests/operator-crypto.test.ts student-tests/pki.test.ts student-tests/grpc-probe.test.ts student-tests/transport-negative.test.ts student-tests/command-runner.test.ts student-tests/checkpoint-guards.test.ts student-tests/openobserve-topology.test.ts student-tests/openobserve-config.test.ts student-tests/openobserve-accounts.test.ts student-tests/openobserve-request-path.test.ts student-tests/openobserve-response.test.ts student-tests/openobserve-search-window.test.ts student-tests/openobserve-reader.test.ts student-tests/openobserve-account-workflow.test.ts student-tests/grafana-guards.test.ts student-tests/grafana-datasources.test.ts student-tests/http-fixture.test.ts student-tests/browser-lifecycle.test.ts student-tests/runtime-preparation.test.ts student-tests/sealed-shutdown.test.ts student-tests/failover-proof.test.ts student-tests/git-tracking-proof.test.ts

student-tests/grafana-datasources.test.ts:
(pass) native listDTO may omit auth fields; authenticate the exact UID detail and health readers [0.53ms]
(pass) configured root account is rejected before datasource health can masquerade as scoped auth [0.13ms]
(pass) HTTP200 health with error body is not a healthy datasource [0.08ms]

student-tests/failover-proof.test.ts:
(pass) read current receipt contents and bind its stopped replica to the current attempt baseline [0.27ms]
(pass) reject old operation receipt even when a file exists [0.16ms]
(pass) reject foreign attempt receipt even when a file exists [0.01ms]
(pass) reject wrong alias receipt even when a file exists [0.02ms]
(pass) reject wrong container receipt even when a file exists [0.02ms]
(pass) reject still running receipt even when a file exists
(pass) reject not initially running receipt even when a file exists
(pass) reject foreign service receipt even when a file exists [0.01ms]
(pass) missing receipt preserves reader error instead of accepting older stable files [0.10ms]
(pass) required read port has no live filesystem fallback [0.04ms]

student-tests/openobserve-response.test.ts:
(pass) HTTP401 text error preserves native HTTP outcome [0.07ms]
(pass) HTTP422 text error preserves native HTTP outcome
(pass) HTTP500 text error preserves native HTTP outcome
(pass) HTTP200 JSON remains parsed [0.03ms]
(pass) HTTP200 malformed success retains the status in its error [0.03ms]

student-tests/http-fixture.test.ts:
(pass) human fixture labels never become invalid API usernames [0.10ms]
(pass) unexpected native HTTP result retains its exact outcome before stable failure [0.64ms]
(pass) diagnostic write failure cannot replace HTTP400 [0.14ms]

student-tests/openobserve-account-workflow.test.ts:
(pass) saved native200 and403 accounts publish only after both account controls [0.50ms]
(pass) positive HTTP401 cannot publish derived credentials [0.11ms]
(pass) positive HTTP503 cannot publish derived credentials [0.03ms]
(pass) positive HTTP201 cannot publish derived credentials [0.02ms]
(pass) unexpected deny HTTP200 cannot publish derived credentials [0.14ms]
(pass) unexpected deny HTTP503 cannot publish derived credentials [0.04ms]
(pass) invalid saved query shape user cannot publish or probe [0.12ms]
(pass) invalid saved query shape user cannot publish or probe [0.04ms]
(pass) invalid saved query shape token cannot publish or probe [0.02ms]
(pass) invalid saved query shape token cannot publish or probe [0.05ms]
(pass) extra owner slot never reaches credential publication [0.10ms]
(pass) workflow requires explicit native and publishing ports [0.03ms]
(pass) invalid query token after a healthy ingest control still cannot publish any derived file [0.09ms]

student-tests/openobserve-config.test.ts:
(pass) Collector uses native file auth and distinct stream-name handling for logs/traces versus metrics [0.37ms]
(pass) Grafana queries measured native metric names without legacy namespace or invented suffixes [0.37ms]
(pass) Grafana native plugin provisioning uses measured fields and native Basic auth consumers [0.18ms]
(pass) Grafana mounts native alert rules using the measured datasource and metric names [0.28ms]

student-tests/pki.test.ts:
(pass) issued leaf verifies exact SAN, issuer, validity and matching key [266.82ms]

student-tests/openobserve-accounts.test.ts:
(pass) native service-account success saves exact credential before returning without a human-user API [0.23ms]
(pass) native HTTP401 never publishes an account [0.07ms]
(pass) native HTTP403 never publishes an account [0.01ms]
(pass) native HTTP500 never publishes an account
(pass) invalid native result fails closed code 3 [0.07ms]
(pass) invalid native result fails closed token 0 [0.01ms]
(pass) invalid native result fails closed token 4097
(pass) invalid native result fails closed user 23
(pass) invalid native result fails closed token 4
(pass) account persistence failure stays primary and prevents a success result [0.08ms]

student-tests/checkpoint-guards.test.ts:
(pass) checkpoint second snapshot rejects changed bytes, additions and removals [0.12ms]
(pass) historical evidence never replaces existing different bytes and permits exact identical bytes [0.23ms]
(pass) handover lease rejects a different valid source generation after initial verification [0.43ms]
(pass) handover lease rejects source mutation even when receipt is unchanged [0.11ms]
(pass) historical finalization requires its accepted source and build generation binding [0.12ms]

student-tests/runtime-preparation.test.ts:
(pass) canonical runtime invokes its build exactly once [0.10ms]
(pass) checked cache verifies existing runtime without an implicit build [0.05ms]
(pass) failed cache verification preserves its error and never falls back to a build [0.07ms]
(pass) unknown runtime mode fails before either operational port [0.05ms]
(pass) constructor requires both explicit ports [0.02ms]

student-tests/sealed-shutdown.test.ts:
(pass) fresh running processes with post-seal cause and exit prove all three shutdowns [0.59ms]
(pass) unrelated restart without freshness cause cannot pass sealed acceptance [0.24ms]
(pass) old pre-seal events cannot explain a later unrelated restart [0.14ms]
(pass) future cause events are not accepted [0.12ms]
(pass) cause event alone does not prove process exit or restart [0.11ms]
(pass) malformed baseline freshness fails before seal [0.08ms]
(pass) future baseline freshness fails before seal [0.02ms]
(pass) stale baseline freshness fails before seal [0.02ms]
(pass) all baseline processes must be running before seal [0.07ms]
(pass) freshness read I/O error preserves its primary identity and never seals [0.08ms]
(pass) baseline ages are rechecked after reads immediately before sealing [0.09ms]
(pass) a replaced container cannot satisfy the original process baseline [0.09ms]

student-tests/kv-secrets.test.ts:
(pass) reads the native KVv2 envelope for api [0.19ms]
(pass) reads the native KVv2 envelope for worker [0.03ms]
(pass) rejects missing KVv2 nesting and required fields [0.05ms]
(pass) rejects credentials for another role [0.03ms]
(pass) rejects invalid metadata and denied responses [0.06ms]

student-tests/grafana-guards.test.ts:
(pass) Grafana endpoint uses the verified published loopback binding despite two networks [0.08ms]
(pass) Grafana endpoint rejects foreign, stopped, wildcard, missing and ambiguous bindings [0.11ms]
(pass) real numeric zero is a valid metric sample [0.10ms]
(pass) HTTP200 with datasource error, empty, null, nonfinite or ragged values cannot pass [0.08ms]
(pass) native history first creation binds exact collection and user key [0.06ms]
(pass) existing native history uses versioned PATCH at the same owned key [0.02ms]
(pass) native Grafana evaluator key reordering does not change a rule [0.18ms]

student-tests/openobserve-request-path.test.ts:
(pass) native URLSearchParams PromQL spaces stay valid before any credential or process port [0.09ms]
(pass) rejects invalid request URI "https://foreign/api/default/streams" [0.02ms]
(pass) rejects invalid request URI "/api/foreign/streams"
(pass) rejects invalid request URI "/api/default/streams\r\nX: bad"
(pass) rejects invalid request URI "/api/default/_search#fragment"
(pass) rejects invalid request URI "/api/default/space in path"
(pass) pinned plugin organization editor endpoint remains available [0.01ms]

student-tests/openobserve-search-window.test.ts:
(pass) actual fractional filesystem mtime serializes native integer microseconds [0.05ms]
(pass) invalid search window NaN 1 fails before a native call [0.02ms]
(pass) invalid search window 1 Infinity fails before a native call
(pass) invalid search window -1 100 fails before a native call
(pass) invalid search window 1 1.7976931348623157e+308 fails before a native call
(pass) invalid search window 10 1 fails before a native call
(pass) invalid search window 1 1 fails before a native call
(pass) invalid search window 1 3600002 fails before a native call

student-tests/openobserve-topology.test.ts:
(pass) telemetry storage is a single OpenObserve instead of Prometheus Loki Tempo and their gateways [0.48ms]
(pass) OpenObserve has its own persistent data and a closed private gateway namespace [0.08ms]
(pass) storage migration retains required neighbors and existing app OTLP contract without OpenObserve secrets [0.11ms]
(pass) Collector and Grafana storage transport targets OpenObserve through the verified gateway [0.18ms]
(pass) Grafana query gateway permits actual editor metadata and guards native request fields [0.06ms]
(pass) Grafana can use an own verified immutable cache alias without changing the canonical image pin [0.06ms]
(pass) Grafana uses its own file-delivered encryption key and secure HTTPS cookies [0.07ms]
(pass) Grafana cannot fetch extra plugin packages outside the approved cached artifacts [0.04ms]

student-tests/command-runner.test.ts:
(pass) secondary diagnostic failures cannot replace command exit and both receipt writers are attempted [0.21ms]
(pass) successful and explicitly allowed command outcomes are returned without diagnostic writes [0.10ms]
(pass) runner requires explicit fake ports and preserves primary execution error [0.07ms]

student-tests/operator-crypto.test.ts:
(pass) operator envelope authenticates ciphertext and hides plaintext [108.40ms]
(pass) operator envelope requires a sufficiently long passphrase [0.07ms]

student-tests/public-endpoint.test.ts:
(pass) selects the actual published loopback listener despite two LB networks [0.10ms]
(pass) rejects invalid published ports [0.06ms]
(pass) rejects unpublished, public, stopped and foreign-resource endpoints [0.09ms]

student-tests/transport-negative.test.ts:
(pass) Bun native certificate-required alert counts as client denial while timeout never does [0.49ms]

student-tests/security-guards.test.ts:
(pass) age rejects future, invalid and stale receipts [0.07ms]
(pass) client role requires exact allowlist membership [0.04ms]
(pass) network endpoints require TLS and an exact intended hostname [0.08ms]

student-tests/git-tracking-proof.test.ts:
(pass) actual producer output is accepted only for matching pinned bytes and current source [0.56ms]
(pass) changed proof bytes are rejected before source inspection [0.13ms]
(pass) missing proof preserves the primary read failure [0.07ms]
(pass) changed source bytes invalidates canonical Git evidence [0.15ms]
(pass) added source entry invalidates canonical Git evidence [0.07ms]
(pass) nonempty private tracking query result never becomes a zero-count proof [0.11ms]
(pass) a weakened query cannot prove the original private-file patterns [0.10ms]
(pass) producer rejects a changing HEAD during capture [0.09ms]
(pass) producer rejects a changing source snapshot [0.09ms]

student-tests/browser-lifecycle.test.ts:
(pass) newPage rejection closes the already acquired context exactly once [0.24ms]
(pass) listener setup failure closes the already acquired context exactly once [0.05ms]
(pass) normal browser work returns its result and closes exactly once [0.05ms]
(pass) cleanup failure is separately reported without replacing the primary error [0.06ms]
(pass) cleanup failure after successful work remains a failure [0.04ms]
(pass) missing ports reject before any browser can be acquired [0.02ms]

student-tests/grpc-probe.test.ts:
(pass) native HTTP2 gRPC probe requires a valid Export response and checks request framing [222.92ms]

student-tests/openobserve-reader.test.ts:
(pass) reader produces fixed historical SQL end and the same PromQL time after three hours [0.87ms]
(pass) fresh reader default uses the explicit clock for both native request forms [0.18ms]
(pass) reader requires explicit native request and clock ports [0.03ms]

 137 pass
 0 fail
 354 expect() calls
Ran 137 tests across 25 files. [643.00ms]
