Conversation
Issue #1302: [Audit] ETL hardcodes manager_id but API-created SQLite managers table uses idAutomated Status SummaryScopeThe SQLite manager-id convention is inconsistent between the API (which has a dialect resolver) and the ETL flows (which hardcode
Failure mode: on a SQLite DB created via the manager API (the documented local/dev path), ETL flows fail with Tasks
Acceptance Criteria
Full Issue TextWhyThe SQLite manager-id convention is inconsistent between the API (which has a dialect resolver) and the ETL flows (which hardcode
Failure mode: on a SQLite DB created via the manager API (the documented local/dev path), ETL flows fail with ScopeMake ETL manager-id access dialect-correct so the SQLite-bootstrapped path works end-to-end. Non-Goals
Tasks
Acceptance Criteria
Implementation NotesAudit baseline: |
|
PR created. |
|
To use Codex here, create a Codex account and connect to github. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (2)
|
| Layer / File(s) | Summary |
|---|---|
Bootstrap comment file agents/codex-1302.md |
Adds a new file with a single top-level comment bootstrapping Codex work for issue #1302. |
Estimated code review effort: 1 (Trivial) | ~2 minutes
Related Issues: Codex-1302 (referenced as issue #1302)
Suggested labels: documentation
Suggested reviewers: stranske
🐰 A tiny file, a comment brief, bootstrapping Codex with quiet relief.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly matches the PR’s bootstrap documentation change for issue #1302. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
codex/issue-1302
Warning
Tools execution failed with the following error:
Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Pull request overview
This PR appears to be an automatically-created bootstrap for Issue #1302, but it does not implement the described SQLite/Postgres manager_id/id compatibility fix in the ETL flows or add the required regression test.
Changes:
- Adds a single bootstrap stub file for Codex tracking of issue #1302.
| @@ -0,0 +1 @@ | |||
| <!-- bootstrap for codex on issue #1302 --> | |||
Keepalive: OFF
Source Issue #1302: [Audit] ETL hardcodes manager_id but API-created SQLite managers table uses id
Base: main
Head: codex/issue-1302
Source: #1302
Automated Status Summary
Scope
The SQLite manager-id convention is inconsistent between the API (which has a dialect resolver) and the ETL flows (which hardcode
manager_id), so ETL breaks on any SQLite database bootstrapped by the API.api/managers.py:136creates the SQLite table asmanagers(id INTEGER PRIMARY KEY, ...), andapi/managers.py:33_manager_id_column(conn)correctly returns"id"for SQLite /"manager_id"for Postgres.manager_id:etl/news_flow.py:71(SELECT manager_id, name, aliases FROM managers),etl/daily_diff_flow.py:138,diff_holdings.py:70,etl/activism_flow.py:124.Failure mode: on a SQLite DB created via the manager API (the documented local/dev path), ETL flows fail with
sqlite3.OperationalError: no such column: manager_id. Prod Postgres is unaffected (its column ISmanager_idperschema.sql), and CI can miss it when fixtures create a different schema than the app itself creates.Tasks
etl/news_flow.py:71,etl/daily_diff_flow.py:138,diff_holdings.py:70,etl/activism_flow.py:124(and any other hardcodedmanager_idreader of themanagerstable). Alternatively, standardize the SQLitemanagersschema onmanager_id.Acceptance Criteria
_ensure_manager_table()+ insert), then call an ETL reader (e.g._fetch_all_manager_ids(conn)/match_entities); current code raisesno such column: manager_id, fixed code returns the inserted manager id.manager_idfails the new test; restoring the resolver passes.Full Issue Text
Why
The SQLite manager-id convention is inconsistent between the API (which has a dialect resolver) and the ETL flows (which hardcode
manager_id), so ETL breaks on any SQLite database bootstrapped by the API.api/managers.py:136creates the SQLite table asmanagers(id INTEGER PRIMARY KEY, ...), andapi/managers.py:33_manager_id_column(conn)correctly returns"id"for SQLite /"manager_id"for Postgres.manager_id:etl/news_flow.py:71(SELECT manager_id, name, aliases FROM managers),etl/daily_diff_flow.py:138,diff_holdings.py:70,etl/activism_flow.py:124.Failure mode: on a SQLite DB created via the manager API (the documented local/dev path), ETL flows fail with
sqlite3.OperationalError: no such column: manager_id. Prod Postgres is unaffected (its column ISmanager_idperschema.sql), and CI can miss it when fixtures create a different schema than the app itself creates.Scope
Make ETL manager-id access dialect-correct so the SQLite-bootstrapped path works end-to-end.
Non-Goals
manager_idstays canonical there)._manager_id_columnlogic.Tasks
etl/news_flow.py:71,etl/daily_diff_flow.py:138,diff_holdings.py:70,etl/activism_flow.py:124(and any other hardcodedmanager_idreader of themanagerstable). Alternatively, standardize the SQLitemanagersschema onmanager_id.Acceptance Criteria
_ensure_manager_table()+ insert), then call an ETL reader (e.g._fetch_all_manager_ids(conn)/match_entities); current code raisesno such column: manager_id, fixed code returns the inserted manager id.manager_idfails the new test; restoring the resolver passes.Implementation Notes
Audit baseline:
main@e5764a5on 2026-06-28. Source-verified: API SQLite create atmanagers.py:136, resolver atmanagers.py:33, hardcoded ETL reads at the listed lines. Prod-Postgres path is unaffected; this is a SQLite/local-path wiring fix.—
PR created automatically to engage Codex.
Summary by CodeRabbit
#1302.