Commit Graph
5 Commits
Author SHA1 Message Date
affaan-m 13b3c5989b test(observer): dispatch status through a fixed private wrapper
Preserve contributor history while applying the exact reviewed current-main repair.

Source-PR: https://github.com/affaan-m/ECC/pull/2878
Source-Parent: 57da51c74b
Review-Manifest-SHA256: a9ff9a500e307cc9031349f086a0d754c3c72fddf999bb97dfbc9c6d7a7b04bd
2026-09-28 03:47:31 -04:00
affaan-m 57da51c74b fix: count observer instinct files using loader eligibility
Preserve contributor intent while handling regular-file symlinks and newline filenames, with private bounded status fixtures.

Source-PR: https://github.com/affaan-m/ECC/pull/2878
Source-Head: e3ab97915f
Integration-Base: d3b8a3e908
2026-09-28 00:20:49 -04:00
Nguyen Thanh Dat e3ab97915f test(observer-status): set process.exitCode so the summary always flushes
Review feedback on #2878. stdout is async when it is a pipe, which is exactly
how tests/run-all.js runs these files, and process.exit() does not wait for
pending writes — so exiting that way can drop the Passed:/Failed: lines the
aggregator totals, defeating the previous commit. The sibling
tests/ci/ito-*-skill.test.js files already use process.exitCode.

Still exits 1 on a broken counter (Passed: 4, Failed: 7) and 0 when clean.
2026-08-25 18:37:00 +07:00
Nguyen Thanh Dat ed6e5a42ee test(observer-status): report every case, not just the first failure
Review feedback on #2878: the static assertions ran at the top level, so a
failure exited the process before the `Passed:`/`Failed:` lines. tests/run-all.js
totals those tokens, so the per-case counts were lost — it still went red via the
non-zero exit, but the granular numbers were not in the totals.

Route every case through the same `runTest()` wrapper the file already used for
the integration cases, and build the case list inside a try so a missing or
renamed `instinct-cli.py` / `start-observer.sh` is a reported failure rather than
a crash.

Reverting the fix now prints `Passed: 4, Failed: 7` and exits 1, naming all seven
broken expectations instead of stopping at the first.
2026-08-25 18:03:35 +07:00
Nguyen Thanh Dat 9af6606142 fix(continuous-learning-v2): count every instinct extension in observer status (#2859)
`start-observer.sh status` globbed `*.yaml`, but the observer prompt tells the
analyzer to write `${INSTINCTS_DIR}/<id>.md` and the loader accepts
`.yaml`, `.yml`, and `.md` (ALLOWED_INSTINCT_EXTENSIONS in
scripts/instinct-cli.py). The one command an operator runs to confirm that
learning works therefore reported `Instincts: 0` on a healthy install — which
is indistinguishable from a silently dead observer, exactly the failure the
status check exists to surface.

Match the loader instead of one of its three extensions, and match how it
enumerates them: `Path.iterdir()` is top level only and `is_file()` skips
directories, so `-maxdepth 1 -type f`; `suffix.lower()` makes the comparison
case-insensitive, so `-iname`. `tr` drops the column padding BSD `wc` emits,
which is why the reported output read `Instincts:        0`.

Verified end to end against the shipped script with 3 `.md`, one `.yaml`, one
`.yml`, one `.YAML`, a `notes.txt`, and a nested `.md`: 1 before, 6 after —
the same six files the loader picks up.
2026-08-25 17:12:08 +07:00