Skip to content

CI: integration job has never passed - T&E tables not found in te_dev #45

Closed

Description

@amar-python

Problem

The integration (postgres service) job in Quality Gate is red on every recent run.

  • main, run 34212325604 (2026-09-08): 19 API integration tests fail with relation "te_dev.organisations" does not exist.
  • PR Gap remediation pass O-01..O-12 and ADR-0001 #44, run 40182260409: 25 of 26 evals pass (Tier P 23/23, Tier I 1/1, Tier S 1/1). tier_e/01_envs_have_identical_structure fails, reporting 0 tables in every env schema, although every deploy exits 0 and reports "already exists, skipping".

Hypothesis (unconfirmed)

The env launchers deploy into a different database or schema from the one CI connects to (PGDATABASE=postgres). One root cause, two symptoms.

Work

  1. Read the workflow, the env_*.sql launchers, deploy_all.sh, the Tier E scenario and the API schema resolution. Confirm the cause from the code before changing anything.
  2. Record the workflow step order, and whether the API test step ran at all on run 40182260409.
  3. Fix the root cause once.
  4. Add a negative control so Tier E still fails on a genuinely empty schema.

Done when

  • The integration job is green on branch gap-remediation-2026-09.
  • Pass, fail and skip counts per step are quoted from the CI run.
  • The negative control is shown failing when the schema is empty.

Activity

  1. added
    ciContinuous integration and the Quality Gate
    verificationClaim must be verified by execution
    on Oct 25, 2026
  2. amar-python commented on Oct 25, 2026

    @amar-python
    OwnerAuthor

    Automated verification: FAIL (verify_issues.py, 2026-10-25)

    integration job on gap-remediation-2026-09 is failure (https://github.com/amar-python/PostgreDataMigrationAppWithCSVLoader/actions/runs/40182260409/job/121135593494). Fix is in PR #61 (into that branch); merge it to turn this green.

    Root cause found and fixed in PR #61 (targets gap-remediation-2026-09). The hypothesis in this issue was wrong: deploys were correct, since te_core_schema.sql does \c :"db_name". Two independent causes:

    1. Tier E passed --set=sch=... with psql -c. psql never interpolates :'sch' in -c, so every schema query was a syntax error, which _column_signature returned as {} and Tier E reported as "0 tables". Query now goes on stdin; a failed query is reported as a query error. Two of three new negative controls fail against the old code.
    2. The job sets PGDATABASE=postgres and api/config.py reads it, so the 19 API tests looked for te_dev in the wrong database. The full-suite step now sets PGDATABASE=te_mgmt_dev.

    With Tier E working it found a real difference: test_run_results, created in te_dev by the Tier S SQL harness. Listed under ignore_tables in the Tier E expectation file, with the reason. Review that choice.

    CI on PR #61, run 40184098823: integration job green for the first time. Evals P/I/S/E 26/26 passed, 0 skipped; test_report.py --strict 239 collected, 239 passed, 0 failed, 0 skipped. Same counts in a local replay on PostgreSQL 16.

    This check stays FAIL until PR #61 is merged into gap-remediation-2026-09.


    Generated by Claude Code

  3. added 2 commits that reference this issue on Oct 25, 2026
  4. amar-python commented on Oct 25, 2026

    @amar-python
    OwnerAuthor

    Fixed by PR #61, merged via PR #44. main integration green: run 40186756039 (evals 26/26, test_report 238/238, 0 skipped).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciContinuous integration and the Quality GateverificationClaim must be verified by execution

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions