aKode fase 2b-2: rimosso login ChatGPT e tutti i sottosistemi solo-ChatGPT
- Login: resta solo chiave API (+ header, Bedrock). Rimossi OAuth/browser, device code, refresh/revoke su auth.openai.com, PAT, agent/workload identity, runtime agent instance, backend-client e openapi-models, workspace routing. - Rimossi: generazione immagini (ext + skill imagegen), history notes, plugin remoti (catalogo, sync, share), cyber access program, daybreak, cloud config e requirements (config_server ora fail-closed), attestation, frozen cloud skills, EMA MCP auth, Codex Apps/connettori, ricerca ospitata, header/zstd/ routing/cookie del backend Codex, fallback OPENAI_API_KEY del realtime. - Messaggi d'errore senza link a chatgpt.com. - Chiavi di config legacy accettate e ignorate; feature rimosse = Stage::Removed. - Test: cancellati solo quelli del codice rimosso; test di sicurezza (sandbox estensioni, permessi, redazione, auth storage, requirements) adattati. Restano solo fallimenti d'ambiente (code-mode-host/V8, ~/.agents). - Istruzioni di sistema invariate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -167,40 +167,12 @@ pub(crate) fn new_safety_access_block_event() -> SafetyAccessBlockCell {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn new_cyber_policy_error_event(
|
||||
notice: crate::daybreak::Notice,
|
||||
) -> SafetyAccessBlockCell {
|
||||
use crate::daybreak::Notice;
|
||||
let (body, actions): (_, &'static [(&str, &str)]) = match notice {
|
||||
Notice::Apply => (
|
||||
"If you’re doing authorized security work, apply for Daybreak to get broader access.",
|
||||
&[
|
||||
("Learn more", SAFETY_ACCESS_BLOCK_LEARN_MORE_URL),
|
||||
(
|
||||
"Apply for Daybreak",
|
||||
"https://openai.com/form/enterprise-trusted-access-for-cyber/",
|
||||
),
|
||||
],
|
||||
),
|
||||
Notice::Disabled => (
|
||||
"Daybreak is currently off. If you’re doing authorized security work, turn it on and try your request again.",
|
||||
&[("Learn more", SAFETY_ACCESS_BLOCK_LEARN_MORE_URL)],
|
||||
),
|
||||
Notice::Astra => (
|
||||
"Daybreak isn’t available for Astra. Some cybersecurity requests may still be limited.",
|
||||
&[("Learn more", SAFETY_ACCESS_BLOCK_LEARN_MORE_URL)],
|
||||
),
|
||||
Notice::Enabled => (
|
||||
"Some cybersecurity requests are still limited, even when Daybreak is on.",
|
||||
&[("Learn more", SAFETY_ACCESS_BLOCK_LEARN_MORE_URL)],
|
||||
),
|
||||
};
|
||||
pub(crate) fn new_cyber_policy_error_event() -> SafetyAccessBlockCell {
|
||||
SafetyAccessBlockCell {
|
||||
title: "This content can’t be shown",
|
||||
explanation: (notice == Notice::Apply)
|
||||
.then(|| "We take extra care with some cybersecurity requests.".into()),
|
||||
body,
|
||||
actions,
|
||||
explanation: Some("We take extra care with some cybersecurity requests.".into()),
|
||||
body: "Some cybersecurity requests are limited.",
|
||||
actions: &[("Learn more", SAFETY_ACCESS_BLOCK_LEARN_MORE_URL)],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
source: tui/src/history_cell/tests.rs
|
||||
expression: rendered
|
||||
---
|
||||
ⓘ This content can’t be shown
|
||||
Daybreak isn’t available for Astra. Some cybersecurity requests may still be
|
||||
limited.
|
||||
Learn more: https://help.openai.com/en/articles/20001326
|
||||
@@ -1,12 +0,0 @@
|
||||
---
|
||||
source: tui/src/history_cell/tests.rs
|
||||
expression: rendered
|
||||
---
|
||||
ⓘ This content can’t be shown
|
||||
Daybreak is currently off. If you’re doing authorized security work, turn it
|
||||
on and try your request again.
|
||||
Learn more: https://help.openai.com/en/articles/20001326
|
||||
|
||||
ⓘ This content can’t be shown
|
||||
Some cybersecurity requests are still limited, even when Daybreak is on.
|
||||
Learn more: https://help.openai.com/en/articles/20001326
|
||||
@@ -1,17 +1,12 @@
|
||||
---
|
||||
source: tui/src/history_cell/tests.rs
|
||||
assertion_line: 821
|
||||
expression: rendered
|
||||
---
|
||||
ⓘ This content can’t be shown
|
||||
We take extra care with some
|
||||
cybersecurity requests. If
|
||||
you’re doing authorized security
|
||||
work, apply for Daybreak to get
|
||||
broader access.
|
||||
cybersecurity requests. Some
|
||||
cybersecurity requests are
|
||||
limited.
|
||||
Learn more: https://
|
||||
help.openai.com/en/
|
||||
articles/20001326
|
||||
Apply for Daybreak: https://
|
||||
openai.com/form/enterprise-
|
||||
trusted-access-for-cyber/
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
---
|
||||
source: tui/src/history_cell/tests.rs
|
||||
assertion_line: 774
|
||||
expression: rendered
|
||||
---
|
||||
ⓘ This content can’t be shown
|
||||
We take extra care with some cybersecurity requests. If you’re doing
|
||||
authorized security work, apply for Daybreak to get broader access.
|
||||
We take extra care with some cybersecurity requests. Some cybersecurity
|
||||
requests are limited.
|
||||
Learn more: https://help.openai.com/en/articles/20001326
|
||||
Apply for Daybreak: https://openai.com/form/enterprise-trusted-access-for-
|
||||
cyber/
|
||||
|
||||
@@ -622,7 +622,6 @@ fn image_generation_call_renders_saved_path() {
|
||||
|
||||
fn session_configured_event(model: &str) -> ThreadSessionState {
|
||||
ThreadSessionState {
|
||||
daybreak_enabled: false,
|
||||
windows_sandbox_host: crate::app::WindowsSandboxHost::Local,
|
||||
thread_id: ThreadId::new(),
|
||||
forked_from_id: None,
|
||||
@@ -926,33 +925,11 @@ fn ps_output_multiline_long_command_snapshot() {
|
||||
|
||||
#[test]
|
||||
fn cyber_policy_error_event_snapshot() {
|
||||
let cell = new_cyber_policy_error_event(crate::daybreak::Notice::Apply);
|
||||
let cell = new_cyber_policy_error_event();
|
||||
let rendered = render_lines(&cell.display_lines(/*width*/ 80)).join("\n");
|
||||
insta::assert_snapshot!(rendered);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cyber_policy_error_event_astra_snapshot() {
|
||||
let cell = new_cyber_policy_error_event(crate::daybreak::Notice::Astra);
|
||||
let rendered = render_lines(&cell.display_lines(/*width*/ 80)).join("\n");
|
||||
insta::assert_snapshot!(rendered);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cyber_policy_error_event_available_snapshot() {
|
||||
let rendered = [
|
||||
crate::daybreak::Notice::Disabled,
|
||||
crate::daybreak::Notice::Enabled,
|
||||
]
|
||||
.into_iter()
|
||||
.map(|notice| {
|
||||
render_lines(&new_cyber_policy_error_event(notice).display_lines(/*width*/ 80)).join("\n")
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n\n");
|
||||
insta::assert_snapshot!(rendered);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn safety_access_block_event_snapshot() {
|
||||
let cell = new_safety_access_block_event();
|
||||
@@ -964,7 +941,7 @@ fn safety_access_block_event_snapshot() {
|
||||
|
||||
#[test]
|
||||
fn cyber_policy_error_event_narrow_snapshot() {
|
||||
let cell = new_cyber_policy_error_event(crate::daybreak::Notice::Apply);
|
||||
let cell = new_cyber_policy_error_event();
|
||||
let rendered = render_lines(&cell.display_lines(/*width*/ 36)).join("\n");
|
||||
insta::assert_snapshot!(rendered);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user