Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.5 KiB
Go
45 lines
1.5 KiB
Go
package protocol
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// TestProtocol_ReopenAlreadyOpenReportsStatus asserts that bd reopen on an
|
|
// already-open issue does NOT print a false "Reopened" message. The stderr
|
|
// output should indicate the issue is already open.
|
|
func TestProtocol_ReopenAlreadyOpenReportsStatus(t *testing.T) {
|
|
t.Parallel()
|
|
w := newWorkspace(t)
|
|
id := w.create("--title", "Already open", "--type", "task")
|
|
|
|
out, err := w.tryRun("reopen", id)
|
|
// Command may succeed (exit 0) or fail — either way, the output should
|
|
// NOT contain the false positive "Reopened" message.
|
|
_ = err
|
|
if strings.Contains(out, "Reopened") {
|
|
t.Errorf("bd reopen on already-open issue printed false 'Reopened' message:\n%s", out)
|
|
}
|
|
if !strings.Contains(out, "already open") {
|
|
t.Errorf("bd reopen on already-open issue should mention 'already open':\n%s", out)
|
|
}
|
|
}
|
|
|
|
// TestProtocol_UndeferNonDeferredReportsStatus asserts that bd undefer on a
|
|
// non-deferred issue does NOT print a false "Undeferred" message. The stderr
|
|
// output should indicate the issue is not deferred.
|
|
func TestProtocol_UndeferNonDeferredReportsStatus(t *testing.T) {
|
|
t.Parallel()
|
|
w := newWorkspace(t)
|
|
id := w.create("--title", "Not deferred", "--type", "task")
|
|
|
|
out, err := w.tryRun("undefer", id)
|
|
_ = err
|
|
if strings.Contains(out, "Undeferred") {
|
|
t.Errorf("bd undefer on non-deferred issue printed false 'Undeferred' message:\n%s", out)
|
|
}
|
|
if !strings.Contains(out, "not deferred") {
|
|
t.Errorf("bd undefer on non-deferred issue should mention 'not deferred':\n%s", out)
|
|
}
|
|
}
|