feat: import open Discussion Framework agendas into Works
Test / Tests and coverage occurred while executing withChecks step.
Intrepid/AI Engineering/pipeline/head There was a failure building this commit
build / jvm (push) Canceled after 0s
build / native (macos-15, macos-arm64) (push) Canceled after 0s
build / native (ubuntu-24.04, linux-x86_64) (push) Canceled after 0s
build / native (windows-2025, windows-x86_64) (push) Canceled after 0s
Test / Tests and coverage occurred while executing withChecks step.
Intrepid/AI Engineering/pipeline/head There was a failure building this commit
build / jvm (push) Canceled after 0s
build / native (macos-15, macos-arm64) (push) Canceled after 0s
build / native (ubuntu-24.04, linux-x86_64) (push) Canceled after 0s
build / native (windows-2025, windows-x86_64) (push) Canceled after 0s
Add deterministic preview and fingerprint-bound application for independent DF sources under an AIE umbrella. Preserve complete agendas and original evidence with source-scoped identities, validated receipts and safe retries. Publish prepared Works atomically, require review for changed imports and retain existing refinement without source edits or model calls. Advertise protocol contract 2 while continuing to read contract-1 projects. Add JVM, concurrency, recovery and native coverage; document usage and complete WRK-0007 with verification evidence.
This commit is contained in:
+39
-2
@@ -3,6 +3,7 @@ set -euo pipefail
|
||||
|
||||
# Run from any directory. The executable argument must be an absolute native path.
|
||||
aie_binary=${1:?Usage: native-smoke.sh /absolute/path/to/ai-engineering}
|
||||
aie_source_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)
|
||||
aie_fixture=$(mktemp -d "${TMPDIR:-/tmp}/ai-engineering-smoke.XXXXXX")
|
||||
if [[ "${AIE_KEEP_FIXTURE:-0}" != 1 ]]; then trap 'rm -rf "$aie_fixture"' EXIT; fi
|
||||
cd "$aie_fixture"
|
||||
@@ -30,9 +31,9 @@ aie_without_git work create 'Continue application' --goal 'Preserve local contex
|
||||
aie_without_git project compatibility --format json > compatibility.json
|
||||
grep -q '"state" : "CURRENT"' compatibility.json
|
||||
grep -q '"migrationRequired" : false' compatibility.json
|
||||
grep -q '"protocolVersion": 1' .ai-engineering/protocol.json
|
||||
grep -q '"protocolVersion": 2' .ai-engineering/protocol.json
|
||||
cp .ai-engineering/protocol.json baseline-protocol.json
|
||||
sed 's/"protocolVersion": 1/"protocolVersion": 99/' baseline-protocol.json > .ai-engineering/protocol.json
|
||||
sed 's/"protocolVersion": 2/"protocolVersion": 99/' baseline-protocol.json > .ai-engineering/protocol.json
|
||||
cp .ai-engineering/protocol.json future-protocol.json
|
||||
if aie_without_git project compatibility --format json > future-compatibility.json; then
|
||||
echo 'Unsupported contract unexpectedly succeeded' >&2
|
||||
@@ -118,6 +119,42 @@ aie_without_git project compatibility --format json > compatibility.json
|
||||
grep -q '"state" : "CURRENT"' compatibility.json
|
||||
cd "$aie_fixture"
|
||||
|
||||
# DF import: independent sources, repeated IDs, reviewed preview and no-op retry.
|
||||
cp -R "$aie_source_root/src/test/resources/discussion-import/alpha" "$aie_fixture/df-alpha"
|
||||
cp -R "$aie_source_root/src/test/resources/discussion-import/beta" "$aie_fixture/df-beta"
|
||||
cp -R "$aie_fixture/df-alpha" "$aie_fixture/df-alpha-before"
|
||||
cp -R "$aie_fixture/df-beta" "$aie_fixture/df-beta-before"
|
||||
mkdir "$aie_fixture/df-import"
|
||||
cd "$aie_fixture/df-import"
|
||||
aie_without_git init --name 'DF import destination' > init.yaml
|
||||
aie_df_args=(--source "alpha=$aie_fixture/df-alpha" --source "beta=$aie_fixture/df-beta"
|
||||
--target alpha=runtime --target alpha=docs --target beta=studio --format json)
|
||||
aie_without_git import discussion "${aie_df_args[@]}" > preview.json
|
||||
grep -q '"action" : "CREATE"' preview.json
|
||||
grep -q '"action" : "SKIP"' preview.json
|
||||
aie_df_sha=$(sed -n 's/.*"fingerprint" : "\([a-f0-9]*\)".*/\1/p' preview.json)
|
||||
test "${#aie_df_sha}" -eq 64
|
||||
aie_without_git import discussion "${aie_df_args[@]}" --apply --expect "$aie_df_sha" > applied.json
|
||||
grep -q '"applied" : true' applied.json
|
||||
aie_without_git work list --format json > imported-works.json
|
||||
test "$(grep -c '"id" : "WRK-' imported-works.json)" -eq 2
|
||||
aie_without_git work context WRK-0001 --format json > imported-context.json
|
||||
grep -q 'café' imported-context.json
|
||||
grep -q 'runtime' imported-context.json
|
||||
cp -R .ai-engineering/works works-before
|
||||
aie_without_git import discussion "${aie_df_args[@]}" > repeat-preview.json
|
||||
aie_df_sha=$(sed -n 's/.*"fingerprint" : "\([a-f0-9]*\)".*/\1/p' repeat-preview.json)
|
||||
grep -q '"action" : "UNCHANGED"' repeat-preview.json
|
||||
aie_without_git import discussion "${aie_df_args[@]}" --apply --expect "$aie_df_sha" > repeated.json
|
||||
diff -r works-before .ai-engineering/works
|
||||
diff -r "$aie_fixture/df-alpha-before" "$aie_fixture/df-alpha"
|
||||
diff -r "$aie_fixture/df-beta-before" "$aie_fixture/df-beta"
|
||||
aie_without_git project validate > import-validation.yaml
|
||||
aie_without_git project compatibility --format json > import-compatibility.json
|
||||
grep -q '"state" : "CURRENT"' import-compatibility.json
|
||||
echo 'Native DF import smoke passed (umbrella, open agendas, original content, preview, provenance and no-op reimport; no Git/JVM/models).'
|
||||
cd "$aie_fixture"
|
||||
|
||||
# A single Git repository can contain both the source and protocol workspace.
|
||||
git init -q single
|
||||
cd single
|
||||
|
||||
Reference in New Issue
Block a user