Claude/production readiness audit 4ulje#1
Conversation
Comprehensive adversarial audit covering architecture, correctness, concurrency, performance, security, and testing across all modules. Identifies 3 release blockers and 6 major issues with fix guidance. https://claude.ai/code/session_01Sf3sz4JNWMr8LArVAnappW
- Fix maxRecentBuffer circular logic (max(a*2, a) → a*2) - Replace O(n) linear scan in SemanticStore.bestMatchingChunkID with ANN index search - Remove silent error fallbacks in CoreMLEmbeddingProvider; errors now propagate - Make retention threshold configurable via minimumRetentionScore config field - Add checkpoint file size validation to prevent DoS via oversized payloads - Add maxEmbeddingTextLength config with auto-truncation for long inputs - Extract shared VectorMath utility using Accelerate/vDSP for SIMD cosine similarity - Deduplicate cosineSimilarity implementations across AgentContext and SemanticStore - Clarify error suppression in forget() with precise where-clause matching - Add backward-compatible Codable decoding for new ConfigurationSnapshot fields https://claude.ai/code/session_01Sf3sz4JNWMr8LArVAnappW
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 090ba96daa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// - Returns: A restored context with persisted stores and session metadata. | ||
| /// - Throws: `ContextCoreError.checkpointCorrupt` when data cannot be decoded or schema is unsupported. | ||
| public static func load(from url: URL) async throws -> AgentContext { | ||
| public static func load(from url: URL, maxBytes: Int = 100_000_000) async throws -> AgentContext { |
There was a problem hiding this comment.
Remove hard-coded 100MB default load cap
load(from:maxBytes:) now applies a fixed 100_000_000 byte cap by default, which causes checkpointCorrupt for valid checkpoints above 100MB even when the configured checkpoint policy is larger or unlimited (maxCheckpointBytes was introduced in the same change). In practice, high-volume sessions can checkpoint successfully but fail to restore via the default load(from:) path unless callers discover and override maxBytes, creating a persistence regression.
Useful? React with 👍 / 👎.
No description provided.