gitgram/aitimemachine/git/t/t0614-reftable-fsck.sh
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
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>
2026-06-23 14:14:09 +03:00

59 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
test_description='Test reftable backend consistency check'
GIT_TEST_DEFAULT_REF_FORMAT=reftable
export GIT_TEST_DEFAULT_REF_FORMAT
. ./test-lib.sh
test_expect_success "no errors reported on a well formed repository" '
test_when_finished "rm -rf repo" &&
git init repo &&
(
cd repo &&
git commit --allow-empty -m initial &&
for i in $(test_seq 20)
do
git update-ref refs/heads/branch-$i HEAD || return 1
done &&
# The repository should end up with multiple tables.
test_line_count -gt 1 .git/reftable/tables.list &&
git refs verify 2>err &&
test_must_be_empty err
)
'
for TABLE_NAME in "foo-bar-e4d12d59.ref" \
"0x00000000zzzz-0x00000000zzzz-e4d12d59.ref" \
"0x000000000001-0x000000000002-e4d12d59.abc" \
"0x000000000001-0x000000000002-e4d12d59.refabc"; do
test_expect_success "table name $TABLE_NAME should be checked" '
test_when_finished "rm -rf repo" &&
git init repo &&
(
cd repo &&
git commit --allow-empty -m initial &&
git refs verify 2>err &&
test_must_be_empty err &&
EXISTING_TABLE=$(head -n1 .git/reftable/tables.list) &&
mv ".git/reftable/$EXISTING_TABLE" ".git/reftable/$TABLE_NAME" &&
sed "s/${EXISTING_TABLE}/${TABLE_NAME}/g" .git/reftable/tables.list > tables.list &&
mv tables.list .git/reftable/tables.list &&
git refs verify 2>err &&
cat >expect <<-EOF &&
warning: ${TABLE_NAME}: badReftableTableName: invalid reftable table name
EOF
test_cmp expect err
)
'
done
test_done