Skip to content

revert: remove incomplete agent_db commits (restore CI to green) - #340

Open
Leoyzen wants to merge 11 commits into
mainfrom
revert/agent-db-incomplete-commits
Open

revert: remove incomplete agent_db commits (restore CI to green)#340
Leoyzen wants to merge 11 commits into
mainfrom
revert/agent-db-incomplete-commits

Conversation

@Leoyzen

@Leoyzen Leoyzen commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Problem

The agent_db capability was committed in a half-complete state across 10 commits (942a9e70b..b8d10ca2f):

  • Committed (tracked): schema_read.py, schema_write.py, schema_feedback.py, schema_advanced.py, tools.py + 4 test files (~5108 lines)
  • Never committed (untracked): __init__.py, helpers.py, instructions.py, visibility.py — which define AgentDBCapability and provide the imports the committed files depend on

This caused CI failures on main across every stage:

Check Failure
Lint (ruff) INP001 — implicit namespace package (missing __init__.py)
Type Check (mypy) Cannot find implementation or library stub for module — untracked dependencies
Integration tests ImportError: cannot import name 'AgentDBCapability'
Unit / E2E Cascading import errors

Root Cause

The committed files imported from modules that were never committed (helpers, instructions, visibility, AgentDBCapability in __init__.py). The final commit b8d10ca2f ("wire all Phase 3-5 tools into build_tools()") only added tools.py — it did not actually wire anything: git grep confirms zero callers of build_tools() or AgentDBCapability anywhere in the codebase.

What This Revert Does

  • Reverts all 10 agent_db commits, deleting the 5 source files + 4 test files
  • Reverts the agent_db-specific per-file ignore rules added to ruff.toml (no longer needed)
  • Restores CI to green on main

What This Revert Does NOT Do

  • No functional code is lost — the committed files had zero callers and were never wired
  • The untracked files (__init__.py, helpers.py, etc.) remain in the developer's working directory, untouched
  • The agent_db feature can be re-introduced as a complete, self-contained unit once all dependencies are ready

Verification

  • git diff --cached --stat: 10 files deleted, 5108 lines removed, ruff.toml restored
  • No imports of agent_db exist outside the reverted files (confirmed via git grep)

Leoyzen added 11 commits July 31, 2026 23:48
Reverts 10 commits that added agent_db capability files in a half-committed
state: schema_read/write/feedback/advanced.py and tools.py were committed,
but their dependencies (__init__.py, helpers.py, instructions.py,
visibility.py defining AgentDBCapability) were never committed. This caused
CI failures across lint (INP001 missing __init__.py), mypy (unresolvable
imports), and integration tests (ImportError: cannot import name
'AgentDBCapability').

The committed files had zero callers — build_tools() was never wired and
no code imported AgentDBCapability. Reverting restores CI to green without
losing any functional code. The agent_db feature can be re-introduced as
a complete, self-contained unit once all dependencies are ready.

Also reverts the agent_db-specific per-file ignore rules added to
ruff.toml (no longer needed without the files).
@opencode-agent

Copy link
Copy Markdown

All verification is complete. The git forensics are conclusive; since the PR's net diff against main is empty, there is no code for a line-level review subagent to analyze — the substantive findings come from the repository state itself.


Review: revert/agent-db-incomplete-commits (#340)

Verdict: Blocking — this PR is a no-op. It changes nothing and should be closed, not merged.

Critical finding: the PR has zero net diff

GitHub's own server-side data confirms this PR modifies 0 files (additions: 0, deletions: 0, changed_files: 0), and local git agrees:

$ git diff origin/main revert/agent-db-incomplete-commits --stat   # (empty)
$ git merge-base origin/main revert/agent-db-incomplete-commits    # 08ce94940 (tip of main)

The branch tree is byte-identical to main. Merging it accomplishes nothing.

Why: the revert is stacked on top of the commits it reverts

  • Commit d0aa4782c ("revert: ...") has parent b8d10ca2f — the last agent_db feature commit. The 10 feature commits are still in this branch's history, and the revert simply undoes them within the same branch.
  • Net effect: feature commits (+5108 lines) + revert (−5108 lines) = zero.

The premise is factually incorrect

  • 942a9e70b..b8d10ca2f were never merged to main: 942a9e70b is not an ancestor of origin/main, and the merge-base is main's own tip (08ce94940).
  • Therefore these commits cannot have broken CI on main. The INP001 / mypy / ImportError failures described were failures of the feature branch's own checks, not of main.
  • The PR description's verification (git diff --cached --stat: 10 files deleted, 5108 lines removed) measured the working tree against the branch's parent commit, not against main. That number is not the PR's effect.

Correct action

  • Close this PR and delete the branch. There is nothing to revert on main; main is already in the "green" state this PR claims to restore.
  • If the goal is to preserve the agent_db work for later re-introduction: keep the 10 commits on a local-only branch (or a feature branch that is never merged), and re-introduce via the OpenSpec workflow (/opsx:propose → apply) as one complete, self-contained unit once __init__.py, helpers.py, instructions.py, visibility.py are ready.
  • A revert commit is only meaningful when the commits actually exist on the target branch. If these had been on main, the fix would be a revert commit based on main's tip so the PR diff showed the deletions.

Verified positives

  • The revert is faithful where it applies: ruff.toml on the branch is identical to main, and no agent_db references remain in the tree. The only build_tools on main are the pre-existing legitimate ones in viking/tools.py and mcp_server_cap.py.
  • Docs: no changes; nothing to review. No AGENTS.md context-loading table, subsystem AGENTS.md, or docs/explanation/ impact (the capability never landed).
  • The undeleted/untracked dependency files are correctly left out of the revert.

Recommendation

Do not merge. Close this PR as unnecessary, and delete the branch. If you want the agent_db work to survive, re-create a branch that excludes these commits and keep it local until the feature is complete.

New%20session%20-%202026-07-31T17%3A23%3A18.179Z
opencode session  |  github run

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