Skip to content

Test Swift hard merge#1618

Closed
simcariou wants to merge 81 commits into
mainfrom
swift
Closed

Test Swift hard merge#1618
simcariou wants to merge 81 commits into
mainfrom
swift

Conversation

@simcariou

Copy link
Copy Markdown
Contributor

Summary

Describe what changed and why.

Mandatory Checklist

  • I followed docs/platform/DEVELOPER_CONTRACT.md.
  • The change is minimal and avoids over-engineering.
  • I ran make code-quality in every touched project.
  • I ran make test in every touched project.
  • I did not introduce unit/default tests that require external services.
  • Any test requiring external services is marked @pytest.mark.integration.
  • I updated documentation when behavior or conventions changed.

Validation Notes

Paste the exact commands and short results.

Risk / Rollback

State main risk and rollback approach.

Dimitri Tombroff and others added 30 commits April 16, 2026 13:02
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…ing method'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…ing method'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…eption''

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…eption''

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Resolved fred-core rename conflict (fred-core/ → libs/fred-core/).
Regenerated libs/fred-core/uv.lock after merge.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add RuntimeErrorEvent(kind="execution_error", message) to fred-sdk:
  RuntimeEventKind enum, class, and RuntimeEvent union. Before this, the
  exception handler yielded {"error": str(exc)} with no kind field —
  silently ignored by any SSE client dispatching on kind.
- Wire RuntimeErrorEvent in fred-runtime _iterate_runtime_event_payloads
  exception handler (replaces bare dict yield).
- Update TurnPersistedEvent docstring: explicitly documented as NOT emitted
  live over the SSE stream; final remains the only reliable end-of-turn
  signal. Type kept for future use.
- Update /agents/execute/stream docstring: document stream termination
  (connection close after final), RuntimeErrorEvent as the error signal,
  and TurnPersistedEvent non-delivery.
- Update RuntimeExecuteRequest.runtime_context description: note that
  user_id defaults to "unknown" in agent_id direct mode unless explicitly
  provided.
- Regenerate frontend runtimeOpenApi.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add section 0 with a plain HTTP SSE sequence diagram, the two execution
paths (managed vs direct), session continuity rule, and the error signal.
Update section 5 to reflect RuntimeErrorEvent (replaces bare-dict gap note)
and clarify TurnPersistedEvent as schema-only, not emitted over SSE.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add section 0.1 with a step-by-step sequence diagram of the managed
execution path (bootstrap → agent list → prepare-execution → runtime SSE),
explaining why control-plane is in the middle for prepare-execution but
not for streaming, and what ExecutionGrant contains.

Update section 8 (SSE contract gaps) from open issues to resolved,
referencing commit eedbc61.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mark all four 3b.6 SSE contract corrections as fixed (commit eedbc61).

Add 3b.8: in no-security/standalone mode (security_enabled=false),
team_id must default to "personal" automatically in fred-runtime and
fred-agent-chat when not explicitly provided. Without this, checkpoints,
KPIs, and history rows have no team identity even in the simplest
single-user deployment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mode (3b.8)

In no-security mode (security_enabled=False) the runtime now implicitly
resolves team_id to "personal" when the caller omits it, so standalone
deployments behave correctly without requiring the client to pass
team_id on every request.

Thread security_enabled through _stream → _iterate_runtime_event_payloads.
CLI client also defaults effective_team_id to "personal" when no login
config is present.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sonal default

Bug: _stream() was passing raw team_id=None to _emit_turn_completed() and
_write_turn_history() while the "personal" default lived only inside
_iterate_runtime_event_payloads(), invisible to the caller.

Fix: move team resolution to _stream() before any downstream call. Remove
security_enabled from _iterate_runtime_event_payloads() (only purpose was
team resolution; caller now owns it).

Also:
- CLI startup banner now prints active team: "[chat] team : personal"
- Test renamed + rewritten to assert the resolved team_id arriving at _iterate
- RUNTIME-EXECUTION-CONTRACT.md: standalone/no-security paragraph in section 0
- BACKLOG.md: 3b.8 fully done; 3b.9 checkpoint retention policy added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…dd error counter

Three production KPI corrections in _emit_turn_completed():

1. Strip session_id, exchange_id, user_id, agent_instance_id from Prometheus
   dims — these are per-turn UUIDs that would create one time-series per turn
   (cardinality bomb). They remain available in history rows and SSE logs.

2. Set finish_reason="error" when execution_error is emitted instead of final,
   making the histogram queryable by outcome without raw label inspection.

3. Add agent.turn_error_total counter emitted only on error turns, enabling
   Prometheus alerting on error rate without histogram label filtering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…entory

Covers fred-runtime, fred-sdk, and fred-agent-chat CLI across 13 feature
areas with status, source files, known gaps, and a standalone validation
checklist.

Records 6 known defects (KD-1 through KD-6) with severity ratings.
Supersedes ad-hoc per-session gap discovery.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Dimitri Tombroff and others added 27 commits May 4, 2026 04:52
* #1587 implement the team and graph agent memory

* #1587 doc and unbit test updates

* #1587 update cicd

* #1587 update cicd

* #1587 update cicd

* #1587 update cicd

* #1587 code quality

* #1587 route security

* #1587 code quality

---------

Co-authored-by: Dimitri Tombroff <dimitri.tombroff@gmail.com>
* #1595 better and useful test coverage

* #1595 better and useful test coverage code quality

* 1595 update docs

* 1595 update docs

* 1595 make test assistant really mocked

* #1595 code quality

* 1595 api drift

---------

Co-authored-by: Dimitri Tombroff <dimitri.tombroff@gmail.com>
Reduces from 275 to 212 lines. New structure:
- Prime directive: extend, do not duplicate
- Reuse audit (ID lookup → backlog → contract → RFC → convergence)
- Decision tree for what to write where
- Task lifecycle (Steps 1-6 + close-out, unchanged)
- Task IDs (condensed; legacy table replaced by one-liner pointer to id-legend.yaml)
- Operational queries + mandatory read order
- Git conventions, when-stuck rules, what-lives-where map

Removed: Non-Negotiable Defaults (duplicate), Fred Runtime Topology narrative,
Current Architecture State (→ docs/ARCHITECTURE.md), full coding constraints
(→ docs/CONVENTIONS.md).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moves General, Python, and Frontend coding constraints (including testing
strategy) from the old CLAUDE.md into a dedicated reference file.
CLAUDE.md now points to this file for Step 4 constraints.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…TURE.md

Short entry point (44 lines): one sentence per component, pointers to
platform/ and design/ for detail. Replaces the "Fred Runtime Topology"
and "Current Architecture State" sections removed from CLAUDE.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
124-line guide for Claire and Arnaud: VS Code + Claude Code setup,
the four files that matter, example questions, weekly rhythm,
how to update files with Claude's help, when to ask Claude vs a human,
and what this guide does not cover.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
README.md (75 lines): definition of a track, index table of 7 active
and 6 recently closed tracks, manifest template, and authoring rules.

M1-multi-agent-memory.md (49 lines): worked example built from actual
id-legend.yaml data and MULTI-AGENT-MEMORY-BACKLOG.md — RFC ref, backlog
ref, 4 open hardening branches (M1-F.1..F.4), 5 closed phases, notes on
sequencing and P1-F dependency.

Other tracks marked "to write" for follow-up sessions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
if len(sessionIDs) > 0 {
sessionID = sessionIDs[i]
sessionID := cfg.SessionID
if cfg.Protocol != "sse" && len(wsSessionIDs) > 0 {
def test_delete_existing_returns_value(self) -> None:
cache: ThreadSafeLRUCache[str, int] = ThreadSafeLRUCache()
cache.set("k", 99)
assert cache.delete("k") == 99

def test_delete_missing_returns_none(self) -> None:
cache: ThreadSafeLRUCache[str, int] = ThreadSafeLRUCache()
assert cache.delete("ghost") is None
@simcariou simcariou closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants