Skip to content

fix: check all errors in Phase C store tests#140

Merged
intel352 merged 2 commits intofeat/issue-87-admin-decomp-cfrom
copilot/sub-pr-126
Feb 23, 2026
Merged

fix: check all errors in Phase C store tests#140
intel352 merged 2 commits intofeat/issue-87-admin-decomp-cfrom
copilot/sub-pr-126

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

Review feedback identified several places in the Phase C test suite where errors were silently discarded, masking root-cause failures and allowing tests to pass incorrectly.

Changes

  • Setup callsCreateCompany, CreateOrganization, CreateProject, CreateWorkflow in all Phase C tests now t.Fatalf on error instead of using _
  • InsertExecution — errors now asserted in TestV1Store_ExecutionStepLifecycle and TestV1Store_ExecutionFailure
  • Row iterationrows.Scan() error checked inside loop; rows.Err() checked after loop in TestV1Store_ExecutionStepLifecycle
  • CountExecutionsByWorkflow — error now asserted before inspecting the returned map in TestV1Store_ExecutionFailure

Before:

company, _ := store.CreateCompany("Co", "", "u1")
_ = store.InsertExecution(execID, wf.ID, "manual", "running", "u1", now)
counts, _ := store.CountExecutionsByWorkflow(wf.ID)

After:

company, err := store.CreateCompany("Co", "", "u1")
if err != nil {
    t.Fatalf("CreateCompany: %v", err)
}
if err = store.InsertExecution(execID, wf.ID, "manual", "running", "u1", now); err != nil {
    t.Fatalf("InsertExecution: %v", err)
}
counts, err := store.CountExecutionsByWorkflow(wf.ID)
if err != nil {
    t.Fatalf("CountExecutionsByWorkflow: %v", err)
}

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Add execution and audit tables with decomposed admin routes fix: check all errors in Phase C store tests Feb 23, 2026
Copilot AI requested a review from intel352 February 23, 2026 14:29
@intel352 intel352 marked this pull request as ready for review February 23, 2026 14:31
@intel352 intel352 merged commit baa0bb8 into feat/issue-87-admin-decomp-c Feb 23, 2026
@intel352 intel352 deleted the copilot/sub-pr-126 branch February 23, 2026 14:32
intel352 added a commit that referenced this pull request Feb 23, 2026
* feat: add execution/audit tables and decompose admin routes (#87)

Add tests for Phase C database tables (workflow_executions, execution_steps,
execution_logs, audit_log) and validate the admin config parses correctly.

Tests cover:
- Execution lifecycle (insert, complete, count by status)
- Execution step lifecycle (insert, complete, ordering)
- Execution logs (insert, count by level)
- Audit log (insert, query)
- Phase C table existence verification
- Execution failure handling
- Admin config parsing and module validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: check all errors in Phase C store tests (#140)

* Initial plan

* fix: check all errors in Phase C store tests per review feedback

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants