|
root / tests / test_hermes_classify.reef
test_hermes_classify.reef Reef 30 lines 1.5 KB
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import hermes
import test.framework

proc main()
    let runner = new framework.TestRunner()

    let copy = hermes.SEED_KIND_COPY()
    let link = hermes.SEED_KIND_SYMLINK()

    // Runtime dirs (hermes-agent/, node/, bin/) used to be SYMLINK for
    // host-upgrade pass-through, but symlinks loop back into themselves
    // across the bind-mount boundary inside containers. v0.3 falls back
    // to COPY for all entries (spec O-3).
    runner.assert_eq_int(hermes.classify_seed_entry("hermes-agent/"), copy, "hermes-agent/ copy (was symlink, see O-3)")
    runner.assert_eq_int(hermes.classify_seed_entry("node/"),         copy, "node/ copy (was symlink)")
    runner.assert_eq_int(hermes.classify_seed_entry("bin/"),          copy, "bin/ copy (was symlink)")

    // Credentials/config/customizations → copy
    runner.assert_eq_int(hermes.classify_seed_entry(".env"),          copy, ".env copy")
    runner.assert_eq_int(hermes.classify_seed_entry("config.yaml"),   copy, "config.yaml copy")
    runner.assert_eq_int(hermes.classify_seed_entry("SOUL.md"),       copy, "SOUL.md copy")
    runner.assert_eq_int(hermes.classify_seed_entry("skills/"),       copy, "skills/ copy (user data, not runtime)")
    runner.assert_eq_int(hermes.classify_seed_entry("hooks/"),        copy, "hooks/ copy")

    // Unknown entries → conservative default (copy)
    runner.assert_eq_int(hermes.classify_seed_entry("custom_thing"),  copy, "unknown defaults to copy")

    runner.report()
end main