mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-13 05:07:53 +02:00
fix(install): harden ECC installer lifecycle
Make Antigravity 2.0 installs native and safely migrate legacy state. Ensure doctor, repair, status projection, repeat installs, legacy Codex sync, and uninstall converge without losing user files. Exclude Python bytecode and harden repo-scan bootstrap guidance. Gate publishing and pull-request merges on one exact packed artifact completing install, repeat, drift, repair, status, and uninstall across Linux, macOS, and Windows. Co-authored-by: lorencifernando-coder <lorenci.fernando@gmail.com> Co-authored-by: Suliman Abdulrazzaq <suliman9000a@gmail.com> Co-authored-by: Wu Shuwen <mikewushuwen@outlook.com>
This commit is contained in:
co-authored by
lorencifernando-coder
Suliman Abdulrazzaq
Wu Shuwen
parent
eb49702651
commit
1db5c8ab4a
@@ -104,6 +104,23 @@ function runTests() {
|
||||
assert.ok(source.includes('node - "$file"'), 'extract_context7_key should use Node-based parsing');
|
||||
})) passed++; else failed++;
|
||||
|
||||
if (test('sync records a versioned ownership manifest before mutating Codex state', () => {
|
||||
const beginIndex = source.indexOf('"$LEGACY_STATE_HELPER" begin');
|
||||
const configMergeIndex = source.indexOf('node "$BASELINE_MERGE_SCRIPT" "$CONFIG_FILE"');
|
||||
const finalizeIndex = source.indexOf('"$LEGACY_STATE_HELPER" finalize');
|
||||
assert.ok(beginIndex > -1, 'legacy manifest begin is missing');
|
||||
assert.ok(configMergeIndex > beginIndex, 'manifest must begin before config mutation');
|
||||
assert.ok(finalizeIndex > configMergeIndex, 'manifest must finalize after managed writes');
|
||||
assert.ok(source.includes('record_managed_path "$out"'), 'generated prompts must be recorded');
|
||||
assert.ok(source.includes('record_managed_path "${ECC_GLOBAL_HOOKS_DIR:-$CODEX_HOME/git-hooks}/pre-commit"'));
|
||||
})) passed++; else failed++;
|
||||
|
||||
if (test('sync inherits its ERR trap so helper failures trigger rollback', () => {
|
||||
assert.match(source, /^set -Eeuo pipefail$/m);
|
||||
assert.ok(source.includes("trap 'rollback_legacy_sync $?' ERR"));
|
||||
assert.ok(source.includes('node "$LEGACY_STATE_HELPER" rollback --state "$LEGACY_STATE_PATH"'));
|
||||
})) passed++; else failed++;
|
||||
|
||||
console.log(`\nResults: Passed: ${passed}, Failed: ${failed}`);
|
||||
process.exit(failed > 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user