fix: CI fixes — tests, lint, env vars, CLI subcommand alignment #41

Merged
mahmoud merged 10 commits from development_ci_fix into development 2026-04-06 18:36:47 +00:00
Owner

Summary

  • Fix missing job_id field in test LogEntry constructors (compilation error)
  • Fix clippy errors: #[allow(dead_code)] on generate_run_name, collapse nested if let
  • Fix job log query: job_logs and job_log_archive filter by job_id field instead of wrong src="job_{id}" pattern
  • Fix test harnesses: pass FORGE_TOKEN and WEBROOT env vars to spawned hero_proc_server
  • Fix CI workflows: add FORGE_TOKEN/FORGEJO_TOKEN secrets to build.yaml and test.yaml
  • Fix run_create tests: add required name parameter
  • Update CLI integration tests for current subcommand structure
  • Update bash rename verification test for current CLI

Test Results

All unit, integration, CLI, and bash tests pass.

## Summary - Fix missing `job_id` field in test `LogEntry` constructors (compilation error) - Fix clippy errors: `#[allow(dead_code)]` on `generate_run_name`, collapse nested `if let` - Fix job log query: `job_logs` and `job_log_archive` filter by `job_id` field instead of wrong `src="job_{id}"` pattern - Fix test harnesses: pass `FORGE_TOKEN` and `WEBROOT` env vars to spawned `hero_proc_server` - Fix CI workflows: add `FORGE_TOKEN`/`FORGEJO_TOKEN` secrets to `build.yaml` and `test.yaml` - Fix `run_create` tests: add required `name` parameter - Update CLI integration tests for current subcommand structure - Update bash rename verification test for current CLI ## Test Results All unit, integration, CLI, and bash tests pass.
ci: Add Forge and Forgejo tokens to test env
Some checks failed
Tests / test (pull_request) Failing after 2m22s
Build and Test / build (pull_request) Failing after 2m53s
6c329fd01d
- Add FORGE_TOKEN to test environment
- Add FORGEJO_TOKEN to test environment
fix: pass FORGE_TOKEN and WEBROOT to test harness server process
Some checks failed
Tests / test (pull_request) Failing after 1m3s
Build and Test / build (pull_request) Failing after 1m38s
175fd30b28
The integration test harness spawns hero_proc_server as a subprocess
but didn't forward required env vars. The server exits immediately
when FORGE_TOKEN or WEBROOT are missing, causing timeout failures.

Defaults to test-token and http://127.0.0.1:9998/ when not set.
fix: add required name param to run_create calls in tests
Some checks failed
Tests / test (pull_request) Failing after 2m52s
Build and Test / build (pull_request) Failing after 3m30s
3196e491ec
The run_create RPC now requires a name parameter. Updated integration
tests to provide one instead of relying on Default which sets it to
None.
fix: pass FORGE_TOKEN and WEBROOT to CLI test harness server
Some checks failed
Tests / test (pull_request) Failing after 1m22s
Build and Test / build (pull_request) Failing after 2m17s
8700164dac
Same fix as the main test harness — the CLI tester also spawns
hero_proc_server without the required env vars, causing all 84
CLI integration tests to timeout.
fix: update CLI integration tests for current subcommand structure
Some checks failed
Tests / test (pull_request) Failing after 1m51s
Build and Test / build (pull_request) Failing after 1m53s
febd67b216
- config → removed (tests now use service add/list/status)
- tree → service tree
- stats → system stats
- reset → system reset
- demo → system demo
- debug-state → debug state
- debug-procs → debug procs
- lint, build → removed (replaced with system/debug/script tests)
- health → system health
fix: add log flush delay in job log tests
Some checks failed
Tests / test (pull_request) Failing after 1m48s
Build and Test / build (pull_request) Failing after 1m51s
03efa6f562
Job log assertions fail intermittently because stdout lines haven't
been flushed to the log store when the query runs immediately after
the job completes. Add a 500ms delay to allow flush.
mahmoud changed title from ci: Add Forge and Forgejo tokens to test env to ci: Fix CI 2026-04-06 18:05:47 +00:00
fix: retry loop for job log assertions instead of fixed sleep
Some checks failed
Tests / test (pull_request) Failing after 1m50s
Build and Test / build (pull_request) Failing after 1m54s
31a8736b27
Replace fixed 500ms sleep with a retry loop (up to 3s) that polls
job_logs until entries appear. The async stdout capture may take
longer in CI containers.
fix: query job logs by job_id field instead of src pattern
Some checks failed
Tests / test (pull_request) Failing after 4m25s
Build and Test / build (pull_request) Successful in 5m1s
3e7c34e4c5
job_logs and job_log_archive queried with src="job_{id}" but the
executor inserts logs with src=action_name. Now that LogEntry has
a dedicated job_id field, query by that directly. This fixes job
log retrieval for all jobs.
fix: pass FORGE_TOKEN and WEBROOT to bash rename verification test
Some checks failed
Tests / test (pull_request) Failing after 3m30s
Build and Test / build (pull_request) Successful in 4m37s
c8204add57
The server lifecycle section of 05_rename_verification.sh starts
hero_proc_server without required env vars, causing immediate exit.
fix: update bash test to use current CLI subcommand structure
All checks were successful
Build and Test / build (pull_request) Successful in 3m46s
Tests / test (pull_request) Successful in 4m22s
54e0ca11b4
- health → system health
- list → service list
- add service → service add
- status → service status
- shutdown → system shutdown
mahmoud merged commit 73d09e94e9 into development 2026-04-06 18:36:47 +00:00
mahmoud referenced this pull request from a commit 2026-04-06 18:36:48 +00:00
mahmoud deleted branch development_ci_fix 2026-04-06 18:36:52 +00:00
mahmoud changed title from ci: Fix CI to fix: CI fixes — tests, lint, env vars, CLI subcommand alignment 2026-04-06 18:39:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_proc!41
No description provided.