Skip to content

msgpack CVE fix, --git-sandbox deprecation, TICKET-16 Phase 2, ADR-0032 A1 decisions - #101

Merged
johnteee merged 7 commits into
mainfrom
claude/epic-wozniak-i1v4l1
Oct 27, 2026
Merged

johnteee merged 7 commits into
mainfrom
claude/epic-wozniak-i1v4l1

Conversation

@johnteee

@johnteee johnteee commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Why

This PR has two parts. The first unblocks main: after #100 merged, pip-audit failed there on a newly published msgpack CVE. The second carries out the owner's decisions of 2026-10-27 on three held items.

What

  • S-P1-5 — msgpack CVE-2026-114613: uv.lock goes from msgpack 1.2.1 to 1.2.4, and no other package moves. The floor in pyproject.toml is raised to >=1.2.3.
  • U-P1-20 — --git-sandbox deprecated (owner decision): the flag is still accepted. When passed, it prints a deprecation warning to stderr, and it will be removed later. The help text, the API docs and the CHANGELOG Unreleased → Deprecated section all say so.
  • U-P1-21 — TICKET-16 Phase 2 (owner approved the plan):
    • REPL /background suspensions failed silently: the observations hold a RunResult, which cannot be serialized to JSON, so no checkpoint was written. Observations are now reduced to JSON-safe data.
    • On resume, prepare_run_resume falls back to the suspension checkpoint's observations when the run has no tool_call_completed events. This is the plan's Option B: no synthetic audit events are written.
  • U-P1-22 — ADR-0032 Amendment A1, docs only: records the owner's answers.
    • Events go to a dedicated hash-chained lifecycle.jsonl.
    • Command info is recorded as a digest only.
    • The record is written first, then the event; a failed emit is logged as a gap and not retried.
    • The change is an amendment to ADR 0032, not a new ADR.
    • The amendment is accepted with implementation pending. The risk report keeps its Human Review gate for the implementation PR.
  • Typing fix: the new helpers use Optional[TextIO] and object instead of Any. Without this, check_any_count --fail-on-increase fails (2180 > 2177).
  • Ledgers: register rows S-P1-5, U-P1-20, U-P1-21 and U-P1-22, recounted (91 total, 85 done). A dated roadmap-status entry, and generated docs regenerated.

How

Each code change was written test-first, and each new test failed before its fix.

  • tests/test_git_sandbox_flag_deprecation.py: before the fix it failed with an ImportError, because the helper did not exist yet.
  • tests/test_repl_resume_rehydrates_observations.py: suspending returned an empty result with "Object of type RunResult is not JSON serializable".
  • For the CVE, pip-audit was first run against the old lockfile export and reproduced the failure.

Done

  • pip-audit on the base and dev exports: no known vulnerabilities.
  • All local gates pass: docstrings, config access, complexity, Any count, ruff check/format, mypy (teaagent + tests), bandit, audit_test_quality (severe and untyped), assertion regression, god modules, circular imports, event-spine wiring, root module count, teaagent selftest, teaagent tool lint, docs consistency and aging.
  • check_high_risk_paths passes.
  • CI was green on the first commit, ad47b471.

Owner-side: tag v0.1.1 at 609657eb is approved, but this session's proxy refuses tag pushes (HTTP 403). Push it with:

git fetch origin && git tag -a v0.1.1 609657eb -m "TeaAgent v0.1.1" && git push origin v0.1.1

Action ID

  • Action: S-P1-5 (also U-P1-20, U-P1-21, U-P1-22)

Risk Class

Risk class: medium

Self-Review Checklist

General (all PRs)

  • ruff check + ruff format --check pass
  • mypy teaagent/ reports 0 issues
  • python3 scripts/run_test_tier.py --tier smoke passes (the full suite is running locally; CI also runs it)
  • Coverage at least 75% (CI reports it)
  • check_root_module_count.py ≤ 184
  • check_complexity.py ≤ 99
  • No circular imports
  • Event-spine wiring passes
  • Docs consistency passes
  • PR has Why / What / How / Done sections

Documentation

  • No contradiction with current-truth docs
  • Commands in docs are executable
  • Stale dated docs updated or marked as superseded

🤖 Generated with Claude Code

https://claude.ai/code/session_01JE5Q9zqTjf7w2PzjzAC2Qq

pip-audit on main failed after the PR #100 merge: msgpack 1.2.1 carries
CVE-2026-114613, fixed in 1.2.3. The lockfile now resolves 1.2.4 and the
declared floor is raised to >=1.2.3 so unlocked installs cannot pick the
vulnerable release.

Action: S-P1-5
Gate: governance-gap (security: known-vulnerable dependency failing the pip-audit gate on main)
Constraint: only msgpack moved in uv.lock; no other dependency upgraded
Tested: pip-audit on the uv export of the old lockfile reproduced the CVE; base and dev exports of the new lockfile report no known vulnerabilities
Confidence: high
Roadmap-Status: unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JE5Q9zqTjf7w2PzjzAC2Qq
Add Amendment A1 (Status: Proposed) to ADR-0032. It defines the two
background lifecycle members BACKGROUND_SUBMITTED and BACKGROUND_STOPPED
(BG-001 §3.5), their payloads, emitting process, destination file, failure
ordering, compatibility, rejected alternatives, exact test list, and open
questions Q1-Q7.

Add docs/reviews/adr-0032-background-events-risk.md (review-system §4.2,
audit schema high-risk) with failure modes, dry run, rollback, and the
Human Review gate marked pending.

No code, no schema, and no ADR status changed. docs/audit-event.schema.json
has no event_type enum, so it needs no edit.

Action: U-P1-22
Gate: owner-override (owner approved drafting the ADR-0032 change for BG-001 §3.5, 2026-10-27)
Constraint: docs only; ADR status Proposed; no code or schema edited
Tested: validate_docs_consistency.py result: Docs consistency check passed (29/29 risk rows, 21/21 ticket rows)
Confidence: medium
Roadmap-Status: unchanged

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JE5Q9zqTjf7w2PzjzAC2Qq
The --git-sandbox flag has had no effect since the git sandbox became
automatic in git repositories. Keep accepting it so no script breaks,
but print a deprecation warning to stderr when it is passed. The flag
will be removed in a later release.

- Add warn_deprecated_git_sandbox() in teaagent/cli/_handlers/_agent/run.py
  and call it at the start of agent_run_task().
- Update the flag help to begin "Deprecated, no effect:".
- Mark the flag deprecated in docs/api/cli-api.md and docs/api/README.md.
- Record the owner decision and resolve the flag item in
  docs/plans/ticket-plans/TASK-DD2-005-plan.md.
- Add a Deprecated entry under Unreleased in CHANGELOG.md.
- Regenerate docs inventory and OKF bundles.

Action: U-P1-20
Gate: owner-override (owner decision 2026-10-27: deprecate --git-sandbox, TASK-DD2-005)
Constraint: flag still accepted; sandbox runtime behavior unchanged
Tested: tests/test_git_sandbox_flag_deprecation.py failed first with ImportError
  (warn_deprecated_git_sandbox missing), then passed after implementation.
  .venv/bin/python -m pytest -q tests/test_git_sandbox_flag_deprecation.py tests/test_git_sandbox_help_honesty.py -> 4 passed
  .venv/bin/python -m pytest -q tests -k "git_sandbox or agent_run or parser" -> 134 passed, 5 skipped, 6828 deselected
  ruff check (3 changed .py files) -> All checks passed; ruff format --check -> already formatted
  mypy --explicit-package-bases (3 files) -> Success: no issues found
  scripts/audit_test_quality.py --fail-on untyped -> exit 0 (untyped 0, baseline 0)
  scripts/check_complexity.py --max 99 -> exit 0 (63 violations, target <= 99)
  scripts/check_public_docstrings.py -> exit 0
  scripts/validate_docs_consistency.py -> Docs consistency check passed.
Confidence: high
Roadmap-Status: unchanged

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JE5Q9zqTjf7w2PzjzAC2Qq
REPL /background suspensions saved session observations into the
suspension checkpoint, but two things broke the round trip:

- The observations carry a RunResult dataclass, which json.dumps rejects.
  Any suspension after a real task failed silently and wrote no checkpoint.
- Resume read observations only from RunStore tool_call_completed events,
  which REPL suspensions never write, so resumed sessions started empty.

Serialize each observation to JSON-safe data (RunResult reduced to run id,
status, answer and error) and have prepare_run_resume fall back to the
suspension checkpoint when the run has no tool_call_completed events. Option
B of the plan is used instead of writing synthetic tool_call_completed events
into the run audit log, which telemetry, receipts and undo read as real tool
executions.

Action: U-P1-21
Gate: owner-override (owner approved TICKET-16 Phase 2 plan as written, 2026-10-27)
Constraint: no audit-schema change; no high-risk path edited
Tested: new tests/test_repl_resume_rehydrates_observations.py written first;
  .venv/bin/python -m pytest -q tests/test_repl_resume_rehydrates_observations.py
  failed before the change (suspend returned '' with "Object of type RunResult
  is not JSON serializable"). After the change: 2 passed.
  .venv/bin/python -m pytest -q tests -k "resume or suspend or chat or repl"
  262 passed, 6704 deselected.
  ruff check and ruff format --check on changed .py files: clean.
  mypy --explicit-package-bases on changed .py files: no issues.
  python3 scripts/audit_test_quality.py --fail-on untyped: exit 0.
  python3 scripts/check_complexity.py --max 99, check_god_modules.py,
  check_public_docstrings.py, check_circular_imports.py: exit 0.
  python3 scripts/check_high_risk_paths.py on changed files: exit 0.
  scripts/validate_docs_consistency.py: passed.
Confidence: high
Roadmap-Status: unchanged

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JE5Q9zqTjf7w2PzjzAC2Qq
Records the owner's 2026-10-27 answers in ADR-0032 Amendment A1 (dedicated
lifecycle.jsonl, digest-only command info, persist-then-emit with a logged
gap, amend 0032) and marks the amendment accepted with implementation
pending; the risk report keeps its Human Review gate for the implementation
PR. Adds register rows U-P1-20, U-P1-21 (done) and U-P1-22 (in progress),
recounted (P1 41, total 91, done 85), and a dated roadmap-status entry.

Action: U-P1-22
Gate: owner-override (owner decisions 2026-10-27 on ADR-0032 A1.7)
Constraint: docs only; no code or schema change; implementation gate left open
Tested: validate_docs_consistency.py passed; register totals recounted from ID rows
Confidence: high
Roadmap-Status: updated 2026-10-27 owner decisions entry (no horizon status moved)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JE5Q9zqTjf7w2PzjzAC2Qq
…cisely

The U-P1-20 and U-P1-21 helpers added three Any annotations and tripped
check_any_count --fail-on-increase (2180 > 2177). The stream is an
Optional[TextIO] and the observation helper takes and returns object.

Action: U-P1-21
Gate: owner-override (owner approved TICKET-16 Phase 2 and the --git-sandbox deprecation, 2026-10-27)
Constraint: annotations only; no behavior change
Tested: check_any_count.py --fail-on-increase failed at 2180, now 2177 <= 2177; mypy clean; the 6 deprecation/resume/help tests pass
Confidence: high
Roadmap-Status: unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JE5Q9zqTjf7w2PzjzAC2Qq
@johnteee johnteee changed the title fix(deps): upgrade msgpack to clear CVE-2026-114613 (main pip-audit red) msgpack CVE fix, --git-sandbox deprecation, TICKET-16 Phase 2, ADR-0032 A1 decisions Oct 27, 2026
The new docs/reviews/adr-0032-background-events-risk.md made the corpus
677 Markdown files (676 inventoried, 371 working), and
test_roadmap_g5_corpus_counts_match_inventory failed on the stale 676.

Action: U-P1-22
Gate: governance-gap (ledger count contradicted by the inventory)
Constraint: count wording only
Tested: tests/test_docs_consistency.py failed on the G5 row, now passes; validate_docs_consistency.py passed
Confidence: high
Roadmap-Status: updated G5 corpus count (no horizon status moved)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JE5Q9zqTjf7w2PzjzAC2Qq
@johnteee
johnteee merged commit f92e776 into main Oct 27, 2026
23 checks passed
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.

2 participants