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:
@@ -594,7 +594,6 @@ mod tests {
|
||||
collaboration_mode: None,
|
||||
multi_agent_version: None,
|
||||
realtime_active: None,
|
||||
cyber_access_program: None,
|
||||
effort: None,
|
||||
summary: Some(codex_protocol::config_types::ReasoningSummary::Auto),
|
||||
}),
|
||||
@@ -637,7 +636,6 @@ mod tests {
|
||||
collaboration_mode: None,
|
||||
multi_agent_version: None,
|
||||
realtime_active: None,
|
||||
cyber_access_program: None,
|
||||
effort: None,
|
||||
summary: Some(codex_protocol::config_types::ReasoningSummary::Auto),
|
||||
}),
|
||||
@@ -676,7 +674,6 @@ mod tests {
|
||||
collaboration_mode: None,
|
||||
multi_agent_version: None,
|
||||
realtime_active: None,
|
||||
cyber_access_program: None,
|
||||
effort: Some(ReasoningEffort::High),
|
||||
summary: Some(codex_protocol::config_types::ReasoningSummary::Auto),
|
||||
}),
|
||||
@@ -712,7 +709,6 @@ mod tests {
|
||||
collaboration_mode: None,
|
||||
multi_agent_version: None,
|
||||
realtime_active: None,
|
||||
cyber_access_program: None,
|
||||
effort: Some(ReasoningEffort::High),
|
||||
summary: Some(codex_protocol::config_types::ReasoningSummary::Auto),
|
||||
}),
|
||||
@@ -861,7 +857,6 @@ mod tests {
|
||||
section_position: None,
|
||||
section_entered_at: None,
|
||||
project_id: None,
|
||||
daybreak_enabled: None,
|
||||
git_sha: None,
|
||||
git_branch: None,
|
||||
git_origin_url: None,
|
||||
|
||||
@@ -189,8 +189,6 @@ pub struct ThreadMetadata {
|
||||
pub section_entered_at: Option<DateTime<Utc>>,
|
||||
/// Canonical project assignment owned by app-server, if any.
|
||||
pub project_id: Option<String>,
|
||||
/// User-selected Daybreak preference, absent until explicitly set.
|
||||
pub daybreak_enabled: Option<bool>,
|
||||
/// The git commit SHA, if known.
|
||||
pub git_sha: Option<String>,
|
||||
/// The git branch name, if known.
|
||||
@@ -344,7 +342,6 @@ impl ThreadMetadataBuilder {
|
||||
section_position: None,
|
||||
section_entered_at: None,
|
||||
project_id: None,
|
||||
daybreak_enabled: None,
|
||||
git_sha: self.git_sha.clone(),
|
||||
git_branch: self.git_branch.clone(),
|
||||
git_origin_url: self.git_origin_url.clone(),
|
||||
@@ -484,9 +481,6 @@ impl ThreadMetadata {
|
||||
if self.project_id != other.project_id {
|
||||
diffs.push("project_id");
|
||||
}
|
||||
if self.daybreak_enabled != other.daybreak_enabled {
|
||||
diffs.push("daybreak_enabled");
|
||||
}
|
||||
if self.git_sha != other.git_sha {
|
||||
diffs.push("git_sha");
|
||||
}
|
||||
@@ -540,7 +534,6 @@ pub(crate) struct ThreadRow {
|
||||
section_position: Option<i64>,
|
||||
section_entered_at_ms: Option<i64>,
|
||||
project_id: Option<String>,
|
||||
daybreak_enabled: Option<bool>,
|
||||
git_sha: Option<String>,
|
||||
git_branch: Option<String>,
|
||||
git_origin_url: Option<String>,
|
||||
@@ -583,7 +576,6 @@ impl ThreadRow {
|
||||
section_position: row.try_get("section_position")?,
|
||||
section_entered_at_ms: row.try_get("section_entered_at_ms")?,
|
||||
project_id: row.try_get("project_id")?,
|
||||
daybreak_enabled: row.try_get("daybreak_enabled")?,
|
||||
git_sha: row.try_get("git_sha")?,
|
||||
git_branch: row.try_get("git_branch")?,
|
||||
git_origin_url: row.try_get("git_origin_url")?,
|
||||
@@ -630,7 +622,6 @@ impl TryFrom<ThreadRow> for ThreadMetadata {
|
||||
section_position,
|
||||
section_entered_at_ms,
|
||||
project_id,
|
||||
daybreak_enabled,
|
||||
git_sha,
|
||||
git_branch,
|
||||
git_origin_url,
|
||||
@@ -694,7 +685,6 @@ impl TryFrom<ThreadRow> for ThreadMetadata {
|
||||
.map(epoch_millis_to_datetime)
|
||||
.transpose()?,
|
||||
project_id,
|
||||
daybreak_enabled,
|
||||
git_sha,
|
||||
git_branch,
|
||||
git_origin_url: git_origin_url
|
||||
@@ -802,7 +792,6 @@ mod tests {
|
||||
section_position: None,
|
||||
section_entered_at_ms: None,
|
||||
project_id: None,
|
||||
daybreak_enabled: None,
|
||||
git_sha: None,
|
||||
git_branch: None,
|
||||
git_origin_url: None,
|
||||
@@ -844,7 +833,6 @@ mod tests {
|
||||
section_position: None,
|
||||
section_entered_at: None,
|
||||
project_id: None,
|
||||
daybreak_enabled: None,
|
||||
git_sha: None,
|
||||
git_branch: None,
|
||||
git_origin_url: None,
|
||||
|
||||
@@ -218,7 +218,6 @@ SELECT
|
||||
threads.section_position,
|
||||
threads.section_entered_at_ms,
|
||||
threads.project_id,
|
||||
threads.daybreak_enabled,
|
||||
threads.git_sha,
|
||||
threads.git_branch,
|
||||
threads.git_origin_url
|
||||
@@ -613,7 +612,6 @@ SELECT
|
||||
threads.section_position,
|
||||
threads.section_entered_at_ms,
|
||||
threads.project_id,
|
||||
threads.daybreak_enabled,
|
||||
threads.git_sha,
|
||||
threads.git_branch,
|
||||
threads.git_origin_url
|
||||
|
||||
@@ -77,7 +77,6 @@ pub(super) fn test_thread_metadata(
|
||||
section_position: None,
|
||||
section_entered_at: None,
|
||||
project_id: None,
|
||||
daybreak_enabled: None,
|
||||
git_sha: None,
|
||||
git_branch: None,
|
||||
git_origin_url: None,
|
||||
|
||||
@@ -56,7 +56,6 @@ SELECT
|
||||
threads.section_position,
|
||||
threads.section_entered_at_ms,
|
||||
threads.project_id,
|
||||
threads.daybreak_enabled,
|
||||
threads.git_sha,
|
||||
threads.git_branch,
|
||||
threads.git_origin_url
|
||||
@@ -684,9 +683,8 @@ INSERT INTO threads (
|
||||
git_origin_url,
|
||||
memory_mode,
|
||||
project_id,
|
||||
daybreak_enabled,
|
||||
attached_thread_parent_id
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
ON CONFLICT(id) DO NOTHING
|
||||
"#,
|
||||
)
|
||||
@@ -739,7 +737,6 @@ ON CONFLICT(id) DO NOTHING
|
||||
.bind(metadata.git_origin_url.as_deref())
|
||||
.bind("enabled")
|
||||
.bind(metadata.project_id.as_deref())
|
||||
.bind(metadata.daybreak_enabled)
|
||||
.bind(metadata.attached_thread_parent_id.map(|id| id.to_string()))
|
||||
.execute_with_busy_retry(self.pool.as_ref())
|
||||
.await?;
|
||||
@@ -748,20 +745,6 @@ ON CONFLICT(id) DO NOTHING
|
||||
Ok(result.rows_affected() > 0)
|
||||
}
|
||||
|
||||
/// Set the user preference without changing rollout-derived thread metadata.
|
||||
pub async fn set_thread_daybreak_enabled(
|
||||
&self,
|
||||
thread_id: ThreadId,
|
||||
daybreak_enabled: bool,
|
||||
) -> anyhow::Result<bool> {
|
||||
let result = sqlx::query("UPDATE threads SET daybreak_enabled = ? WHERE id = ?")
|
||||
.bind(daybreak_enabled)
|
||||
.bind(thread_id.to_string())
|
||||
.execute_with_busy_retry(self.pool.as_ref())
|
||||
.await?;
|
||||
Ok(result.rows_affected() > 0)
|
||||
}
|
||||
|
||||
pub async fn set_thread_memory_mode(
|
||||
&self,
|
||||
thread_id: ThreadId,
|
||||
@@ -998,7 +981,7 @@ WHERE id = ?
|
||||
// Backfill/reconcile callers merge existing git info before upserting, but that
|
||||
// read/modify/write is not atomic. Preserve non-null SQLite git fields here so
|
||||
// an explicit metadata update cannot be lost if a stale rollout upsert lands later.
|
||||
// Daybreak and project choices are insert-only here; explicit changes use their setters.
|
||||
// Project choices are insert-only here; explicit changes use their setters.
|
||||
sqlx::query(
|
||||
r#"
|
||||
INSERT INTO threads (
|
||||
@@ -1041,9 +1024,8 @@ INSERT INTO threads (
|
||||
git_origin_url,
|
||||
memory_mode,
|
||||
project_id,
|
||||
daybreak_enabled,
|
||||
attached_thread_parent_id
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
ON CONFLICT(id) DO UPDATE SET
|
||||
attached_thread_parent_id = COALESCE(excluded.attached_thread_parent_id, threads.attached_thread_parent_id),
|
||||
rollout_path = excluded.rollout_path,
|
||||
@@ -1136,7 +1118,6 @@ ON CONFLICT(id) DO UPDATE SET
|
||||
.bind(metadata.git_origin_url.as_deref())
|
||||
.bind(creation_memory_mode.unwrap_or("enabled"))
|
||||
.bind(metadata.project_id.as_deref())
|
||||
.bind(metadata.daybreak_enabled)
|
||||
.bind(metadata.attached_thread_parent_id.map(|id| id.to_string()))
|
||||
.bind(recency_at.map(datetime_to_epoch_seconds))
|
||||
.bind(recency_at.map(datetime_to_epoch_seconds))
|
||||
@@ -1460,7 +1441,6 @@ SELECT
|
||||
threads.section_position,
|
||||
threads.section_entered_at_ms,
|
||||
threads.project_id,
|
||||
threads.daybreak_enabled,
|
||||
threads.git_sha,
|
||||
threads.git_branch,
|
||||
threads.git_origin_url
|
||||
|
||||
Reference in New Issue
Block a user