Skip to content

v0.4.12.1 — team adapter signature drift hotfix#19

Merged
jinhongkuan merged 1 commit into
mainfrom
chore/bump-v0.4.12.1
Apr 15, 2026
Merged

v0.4.12.1 — team adapter signature drift hotfix#19
jinhongkuan merged 1 commit into
mainfrom
chore/bump-v0.4.12.1

Conversation

@jinhongkuan

Copy link
Copy Markdown
Contributor

Summary

Hotfix for a 6-release latent regression in `events/team_adapter.py`. Surfaced during v0.4.12 preflight dogfooding on bicameral's own repo (which runs in team mode) — every `link_commit` call had been failing with `TypeError: TeamWriteAdapter.ingest_commit() got an unexpected keyword argument 'authoritative_ref'` since v0.4.6.

The bicameral ledger's 23 decisions were stuck `ungrounded` because the grounding sweep never ran in team mode. Discovered when v0.4.12's new `bicameral.preflight` tool returned 0 matches on every dogfood query — traced back to silent `TypeError` swallowed by the fail-open path.

Fixes:

  • `TeamWriteAdapter.ingest_commit` forwards `authoritative_ref` (v0.4.6 kwarg)
  • `TeamWriteAdapter.ingest_payload` forwards `ctx` (v0.4.6 kwarg)
  • Pass-throughs added for `backfill_empty_hashes` (v0.4.5), `get_all_source_cursors` (v0.4.6), `wipe_all_rows` (v0.4.6) — were missing entirely

Test plan

  • 28 new `inspect.signature` drift tests in `tests/test_v0412_1_team_adapter_drift.py` — block any future signature drift between inner and wrapper at PR time
  • Full v0.4.12.1 regression: 186 passed
  • Surfaced via v0.4.12 dogfood on bicameral's team-mode repo
  • Manual: re-dogfood preflight on bicameral repo, verify `fired=true` on relevant topics now that link_commit actually runs

🤖 Generated with Claude Code

Hotfix for a class of latent regressions in events/team_adapter.py
that have been silently breaking team mode since v0.4.6. Surfaced
during v0.4.12 preflight dogfooding on bicameral's own repo (which
runs in team mode) — every link_commit call had been failing with
TypeError: TeamWriteAdapter.ingest_commit() got an unexpected keyword
argument 'authoritative_ref', causing the bicameral ledger's 23
decisions to be stuck ungrounded.

Six releases of latent breakage caught by dogfooding the v0.4.12
preflight tool against a real team-mode repo for the first time.

Fixes:
  - TeamWriteAdapter.ingest_commit now forwards authoritative_ref
    (added by v0.4.6 pollution guard)
  - TeamWriteAdapter.ingest_payload now forwards ctx
    (added by v0.4.6 pollution fix)
  - Pass-throughs added for backfill_empty_hashes (v0.4.5),
    get_all_source_cursors (v0.4.6), wipe_all_rows (v0.4.6) — were
    missing entirely

The handle_link_commit code had a hasattr() check around
backfill_empty_hashes that masked the missing method as a silent
degradation. handle_reset would have raised AttributeError on first
team-mode reset call. handle_ingest would have raised TypeError on
EVERY team-mode ingest call.

Tests: 28 cases in tests/test_v0412_1_team_adapter_drift.py that use
inspect.signature to assert the wrapper's public methods accept the
same kwargs as the inner adapter. The exact regression pattern that
broke v0.4.6 silently for six releases is now blocked at PR time.
Full v0.4.12.1 regression: 186 passed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jinhongkuan jinhongkuan merged commit 761ee18 into main Apr 15, 2026
@jinhongkuan jinhongkuan deleted the chore/bump-v0.4.12.1 branch April 15, 2026 03:37
@coderabbitai

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@jinhongkuan has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 26 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 18 minutes and 26 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ec419fd8-161f-407c-a8ff-6a02bed20b41

📥 Commits

Reviewing files that changed from the base of the PR and between 3b896fc and 85c7363.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • events/team_adapter.py
  • pyproject.toml
  • tests/test_v0412_1_team_adapter_drift.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/bump-v0.4.12.1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

jinhongkuan pushed a commit that referenced this pull request Apr 30, 2026
…hook

3-phase plan, L2 bug-fix:
- Phase 0: promote cli/branch_scan.py:_invoke_link_commit to shared
  cli/_link_commit_runner.py module (refactor under existing coverage).
- Phase 1: register link_commit subcommand in server.py:cli_main with
  JSON-to-stdout default + --quiet flag. New cli/link_commit_cli.py +
  tests/test_link_commit_cli.py (6 tests).
- Phase 2: replace setup_wizard.py post-commit hook's silent-suppress
  with stderr-loud variant + tests/test_hook_command_registration.py
  (3-test smoke checking every hook subcommand is registered).
- Phase 3: CHANGELOG [Unreleased] Fixed entry.

5 open questions documented; recommendations baked into plan body.

Closes the silent-failure bug that affected every Guided-mode user
since post-commit hook was added. CHANGELOG falsely advertised hook
as functional. Smoke test would have caught it at PR time.

META_LEDGER #19 (PLAN entry, chain hash 49044f4c).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Knapp-Kevin added a commit that referenced this pull request May 5, 2026
Resolves long-standing conflicts between PR #121 (CI grounding lint
for plan files + PR-body refs, closes #114) and dev's progression
since the PR was opened on 2026-04-29:

- CHANGELOG.md: kept #114 grounding-lint entry alongside dev's #173
  (preflight graph expansion) and #175 (Step 5.6 disambiguation)
  Unreleased entries; collapsed duplicate "### Changed" header.
- docs/META_LEDGER.md: took dev side wholesale. PR #121's branch
  inserted Entry #19 (audit PASS) and #20 (substantiation seal) for
  #114, but dev's chain has progressed to 41 entries since (most
  recent: v0-release-blockers SEAL at 7cc405fc). Re-anchoring the
  PR's mid-chain entries would require recomputing every subsequent
  chain hash — not safely automatable. The audit/seal history for
  #114 is preserved in git history via commits 11685e5 and 218254e.
- docs/SYSTEM_STATE.md: same — took dev side wholesale.
- plan-114-grounding-lint.md: line 61 referenced
  `.github/scripts/post_drift_comment.py` as a precedent example;
  dev deleted that file. Marked as `(nonexistent)` exemption per
  the lint's own exemption vocabulary.

Self-test: `python scripts/lint_plan_grounding.py plan-114-grounding-lint.md`
exits 0 (the plan that builds the lint passes the lint). 14/14 lint
unit tests pass; ruff/mypy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Knapp-Kevin added a commit to Knapp-Kevin/bicameral-mcp that referenced this pull request May 21, 2026
…remediation

GATE TRIBUNAL entry covering both audit iterations:
- v1 (a5e6a05): VETO on F-1 OWASP A03 — `echo "$PR_BODY"` in
  workflow shell exposes command-substitution injection.
- v2 (4ea06be): PASS — workflow command now passes PR_BODY via
  direct os.environ read in Python, eliminating the shell
  intermediate.

Chain hash 850ec57f extends from BicameralAI#18 (BicameralAI#48 SEAL eacc6f89) on dev.

Notable: the plan that builds the lint for one class of
carelessness (filesystem-grounding drift) had a different class
of carelessness (OWASP A03). Audit caught both; QOR
defense-in-depth working as designed.

Plan PASS at 4ea06be; chain to /qor-implement.
Knapp-Kevin added a commit to Knapp-Kevin/bicameral-mcp that referenced this pull request May 21, 2026
Reality matches Promise. All 7 planned files exist; 14/14 new tests
green; ruff/format/mypy clean; self-test passes (the plan that builds
the lint cleanly passes the lint).

Plan: plan-114-grounding-lint.md (v2 PASS @ 4ea06be)
Audit: META_LEDGER BicameralAI#19 (chain hash 850ec57f)
Merkle seal: a19a04debe5f8f38aab182263e94819d50743849a26cdb8cc4aa3279a81be265

Closes the SG-PLAN-GROUNDING-DRIFT loop after 5 instances tracked.
Defense-in-depth: author-time `ls -d */` mitigation + CI lint
durable countermeasure now both in place.

Capability shortfalls: gate artifacts, reliability sweep, version bump
all skipped (qor/ runtime helpers absent on this branch).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant