You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8a13d76
Browse filesBrowse the repository at this point in the historyBrowse files
FlyBot Dev-3
committed
fix(live-e2e): one reading of DEEPSEEK_API_KEY for the preflight, the bench and the guard (#2214)
The CI preflight published key=true for any non-empty string, while the bench
starter and the run guard refused the mock's key and anything under 16
characters. So a short or mock key skipped nothing: the bench started and failed
the night for exactly the reason the #794 skip exists to avoid.
One module (dev/live-e2e/key.mjs) now returns the verdict and the words for it,
and all three readers use it. A key that is present but unusable is skipped with
its own warning and its own summary, so the skip never reads as a pass and the
reason is visible without reading a red log. A key long enough but not real is
still not detected here; only the endpoint can judge that.
exportconstWARNING='::warning title=Live E2E skipped::DEEPSEEK_API_KEY is not configured as a repository secret; the four real-model checks and the evidence bundle are skipped, so this run measured nothing'
14
19
@@ -20,15 +25,26 @@ export const SUMMARY = [
20
25
'**This run is green because there was nothing to run, not because the suite passed.** Add the secret in Settings → Secrets and variables → Actions to measure the suite again (#794).',
21
26
]
22
27
28
+
exportconstUNUSABLE_WARNING='::warning title=Live E2E skipped::DEEPSEEK_API_KEY is set but is not a usable key (the mock\'s key, or shorter than 16 characters); the four real-model checks and the evidence bundle are skipped, so this run measured nothing'
29
+
30
+
exportconstUNUSABLE_SUMMARY=[
31
+
'### Live E2E skipped: the repository secret is not a usable key',
32
+
'',
33
+
'`DEEPSEEK_API_KEY` is set, but the suite refuses it: the mock\'s key or fewer than 16 characters never reaches the real endpoint, so no step of the suite ran and no evidence bundle was produced.',
34
+
'',
35
+
'**This run is green because there was nothing to run, not because the suite passed.** Replace the secret in Settings → Secrets and variables → Actions with a real key to measure the suite again.',
36
+
]
37
+
23
38
// A secret that is not configured reaches the step as an empty string, not as a missing variable,
A `Live E2E` run no longer publishes a key the suite itself refuses: the preflight that decides whether any step runs, the bench starter and the run guard now read `DEEPSEEK_API_KEY` through one module, so the mock's key or one under 16 characters is skipped with its own warning — saying plainly that nothing ran — instead of reaching a bench that refuses it and failing the night for a reason the skip exists to avoid. A key long enough but not real is not detected here; only the endpoint can judge that ([#2214](https://github.com/ThinkFlowLab/FlyBot/issues/2214)).
if(homeProblem)die(`${homeProblem}\n(the bench home must be outside ${ROOT}; export LIVE_E2E_HOME to choose it)`)
30
32
31
33
constapiKey=process.env.DEEPSEEK_API_KEY??''
32
-
if(!apiKey||apiKey==='mock-key'||apiKey.length<16)die('DEEPSEEK_API_KEY is missing, too short, or the mock\'s; a real key is required (never printed)')
34
+
constkey=keyReading(apiKey)
35
+
if(!key.usable)die(`DEEPSEEK_API_KEY ${keyProblem(key.reason)}; a real key is required (never printed)`)
0 commit comments