Skip to content

Clawteam/e2e test/project feature datadog service core#10

Open
Fiooodooor wants to merge 2 commits into
Fiooodooor:mainfrom
icehippo:clawteam/e2e-test/project-feature-datadog-service-core
Open

Clawteam/e2e test/project feature datadog service core#10
Fiooodooor wants to merge 2 commits into
Fiooodooor:mainfrom
icehippo:clawteam/e2e-test/project-feature-datadog-service-core

Conversation

@Fiooodooor
Copy link
Copy Markdown
Owner

Summary

  • Problem:
  • Why it matters:
  • What changed:
  • What did NOT change (scope boundary):

Change Type

  • Bug fix
  • Feature
  • Refactor
  • NIC porting slice (specify phase + role below)
  • Docs
  • Security hardening
  • Chore/infra

Scope

  • ClawTeam CLI / orchestration
  • Spawn / backends
  • Skills / tool execution
  • MCP server / transport
  • Task board / inbox
  • NIC porting agents / identities
  • Templates / profiles
  • Tests
  • CI/CD / infra
  • Docs

NIC Porting Context (if applicable)

Field Value
Driver
Target OS
Phase
Role
Board Task ID

Gate Checklist (NIC porting PRs)

  • native_score >= 98.0 (no framework/non-native API calls)
  • portability_score >= 95.0 (cross-compile matrix clean)
  • test_pass_rate = 100% (all TDD tests green)
  • build_status = green (Linux + FreeBSD compile)
  • critical_risks = 0 (no open critical risks in register)
  • Zero-copy verified (no memcpy in hot paths)
  • DMA sync discipline followed (PREWRITE/POSTREAD bracketing)
  • Checker agent PASS verdict attached

Linked Issue/PR

  • Closes #
  • Related #
  • This PR fixes a bug or regression

Root Cause / Regression History (if applicable)

  • Root cause:
  • Missing detection / guardrail:
  • Prior context:
  • Why this regressed now:

Risk Register Impact

  • No new risks introduced
  • New risk(s) added to register with mitigation owner
  • Existing risk(s) mitigated or closed (specify IDs):

Regression Test Plan

For bug fixes, name the test(s) that would have caught this. For porting slices,
list the TDD tests that validate the change. Otherwise write N/A.

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file:
  • Scenario the test should lock in:
  • Why this is the smallest reliable guardrail:
  • Existing test that already covers this (if any):
  • If no new test is added, why not:

User-visible / Behavior Changes

List user-visible changes (including defaults/config).
If none, write None.

Diagram (if applicable)

For UI changes or non-trivial logic flows, include a small ASCII diagram reviewers can scan quickly. Otherwise write N/A.

Before:
[user action] -> [old state]

After:
[user action] -> [new state] -> [result]

Security Impact (required)

  • New permissions/capabilities? (Yes/No)
  • Secrets/tokens handling changed? (Yes/No)
  • New/changed network calls? (Yes/No)
  • Command/tool execution surface changed? (Yes/No)
  • Data access scope changed? (Yes/No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS:
  • Runtime/container:
  • Model/provider:
  • Integration/channel (if any):
  • Relevant config (redacted):

Steps

Expected

Actual

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
  • Edge cases checked:
  • What you did not verify:

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No)
  • Config/env changes? (Yes/No)
  • Migration needed? (Yes/No)
  • If yes, exact upgrade steps:

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk:
    • Mitigation:

icehippo added 2 commits April 5, 2026 16:34
Phase 0-5: AI dev team OS with per-project-type
pipelines, dashboard UI, Jira/Datadog integration,
E2E test infra, Second Brain knowledge store.

Bug fixes from dual review pipeline:
- Fix dual workflow identity in ProjectManager
- Fix mailbox cross-consume (peek first)
- Fix stale context cache on stage transition
- Fix zombie process on health check failure
- Unify stage prompts, add body size limit
- Optimize N+1 query, add threading.Lock
Address 81% of daily production errors (466/24h):

- P0 (63%): FallbackChain with exponential backoff
  retry for llm.sub_agent.fallback.failed
- P1 (18%): SafeContextBuilder with required field
  validation for memory_context_preparation_failed
- P2 (6%): MemoryGuard with RSS monitoring and
  chunked processing for Worker SIGKILL OOM

Includes 52 tests (failure ratio 62%+).
Copilot AI review requested due to automatic review settings May 9, 2026 16:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands ClawTeam’s “service:core” reliability work (retry/context/memory guards) while also introducing a Slack-first “devteam” operating runtime and an “investment” runtime, plus a richer board/dashboard view and supporting integrations.

Changes:

  • Add clawteam.fixes.* modules (P0/P1/P2) with tests for retry/backoff, safe context building, and worker memory guardrails.
  • Introduce a new clawteam.devteam runtime (projects, workflow, supervisor, sessions, meetings, control plane, integrations) with dashboard-oriented tests.
  • Add an clawteam.investment runtime (Slack manifest/helpers, scheduler/state, cases, execution adapters) and extend template parsing to accept investment/devteam blocks.

Reviewed changes

Copilot reviewed 52 out of 53 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/test_worker_memory.py Unit tests for MemoryGuard and chunked processing behavior.
tests/test_persona_memory.py Unit tests for persona long-term memory store (save/load, retention, parsing).
tests/test_memory_context.py Unit tests for safe context building and required-field enforcement.
tests/test_fallback_retry.py Async tests for retry-with-backoff and provider fallback chain.
tests/test_devteam_dashboard.py Integration-ish tests covering devteam bootstrap, board collection, CLI commands, meetings, and sessions.
clawteam/templates/init.py Extend template schema parsing to include investment and devteam sections.
clawteam/spawn/tmux_backend.py Add env-unset support, default Claude model injection, follow-up prompt send, and idle detection helpers.
clawteam/spawn/subprocess_backend.py Add env-unset support and default Claude model injection for subprocess spawns.
clawteam/spawn/registry.py Add get_spawn_info() helper for locating an agent spawn record across teams.
clawteam/investment/slack.py New stdlib Slack Web API helpers + manifest/YAML rendering for investment runtime.
clawteam/investment/scheduler.py New cadence parsing and persistent schedule-slot state for investment runtime.
clawteam/investment/models.py New Pydantic models for investment blueprint/runtime state.
clawteam/investment/execution.py New execution adapters (Binance REST + tossctl wrapper) with preview/submit flows.
clawteam/investment/cases.py New investment case persistence + Slack thread binding.
clawteam/investment/bootstrap.py New bootstrap + persistent state/blueprint writers for investment runtime.
clawteam/investment/init.py Public exports for investment runtime APIs.
clawteam/fixes/worker_memory.py New MemoryGuard + chunked processing helper to reduce OOM risk.
clawteam/fixes/memory_context.py New SafeContextBuilder/ContextField for validated context assembly.
clawteam/fixes/fallback_retry.py New retry/backoff + provider fallback chain orchestration.
clawteam/fixes/exceptions.py New structured exceptions for core error patterns.
clawteam/fixes/init.py Package exports and documentation for the P0/P1/P2 fix modules.
clawteam/devteam/workflow.py New sprint workflow state machine and per-project-type pipelines.
clawteam/devteam/supervisor.py New in-process background supervisor thread managing runtime loop + status/events.
clawteam/devteam/slack.py New stdlib Slack client + Socket Mode event source (devteam-local copy).
clawteam/devteam/sessions.py New worker session tracking + snapshots + tmux log capture.
clawteam/devteam/scheduler.py New devteam cadence parsing + scheduler store for recurring jobs.
clawteam/devteam/projects.py New dev project persistence + Slack thread binding + stage advancement.
clawteam/devteam/models.py New devteam domain models (projects, sessions, meetings, commands, blueprint).
clawteam/devteam/memory.py New persona long-term memory store with retention + LLM compression.
clawteam/devteam/meetings.py New meeting lifecycle + lightweight auto-ticked discussion rounds.
clawteam/devteam/llm.py New LLM client abstraction (Claude CLI → Bedrock → Direct API → fallback).
clawteam/devteam/knowledge.py New global knowledge base with extraction/compression and simple search.
clawteam/devteam/jira.py New stdlib Jira REST client helpers + context builder.
clawteam/devteam/integrations.py New discovery/loading helpers for OpenCode env/profile + integration detection.
clawteam/devteam/github.py New gh CLI integration utilities (PR context, Actions runs, repo info).
clawteam/devteam/e2e.py New E2E server runner utilities (process mgmt, HTTP steps, reporting).
clawteam/devteam/datadog.py New stdlib Datadog API client helpers + context builder.
clawteam/devteam/controlplane.py New persistent control-plane store for activities and recurring jobs.
clawteam/devteam/bootstrap.py New devteam runtime bootstrap + persisted blueprint/state writers.
clawteam/devteam/init.py Package marker + docstring for devteam module.
clawteam/board/collector.py Extend board payload to include devteam data, workspaces, opencode, and cached GitHub info.

Comment on lines +219 to +222
try:
raw = chat(_EXTRACT_SYSTEM_PROMPT, user_prompt, max_tokens=300)
parsed = _parse_json_response(raw)
if not parsed:
Comment on lines +257 to +258
_COMPRESS_SYSTEM_PROMPT,
user_prompt,
Comment on lines +392 to +395
cache_key = "github_actions"
cached = self._get_cached_github(cache_key)
if cached is not None:
return cached
Comment on lines +570 to +573
# 마지막 줄이 빈 줄이고, 이전 줄에 내용이 있으면 idle
# (tmux capture-pane은 idle 상태에서 trailing newline을 포함)
if len(raw_lines) >= 2 and not raw_lines[-1].strip() and non_empty:
return True
Comment on lines +106 to +113
results: list[Any] = []
gc_interval = memory_guard.check_interval_items if memory_guard else chunk_size

for idx, chunk in enumerate(_iter_chunks(items, chunk_size)):
if memory_guard is not None:
memory_guard.check()
results.append(processor_fn(chunk))
if (idx + 1) % max(1, gc_interval // chunk_size) == 0:
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.

3 participants