feat(stage1): audit GSHS outcome components

This commit is contained in:
Jinotech
2026-09-20 08:35:13 +12:00
parent b86ab7eacf
commit f0a4538242
8 changed files with 9856 additions and 149 deletions
+89
View File
@@ -2,6 +2,95 @@
Command failures and integration errors.
---
## [ERR-20260920-035] gshs-questionnaire-directory-assumption
**Logged**: 2026-09-20
**Priority**: low
**Status**: resolved
**Area**: docs
### Summary
The first questionnaire inventory command assumed a non-existent `03_questionnaires_and_codebooks` directory.
### Error
`rg` returned an OS error because that path does not exist.
### Context
The dataset uses `GSHS/Questionnaire`, while `03_examples` is a separate directory. No files were changed.
### Suggested Fix
Enumerate the GSHS root before applying a documentation-path convention.
### Metadata
- Reproducible: yes
- Related Files: `Dataset/GSHS-全球学生健康调查数据/GSHS/Questionnaire`
- Pattern-Key: docs.path-assumption
### Resolution
- **Resolved**: 2026-09-20
- **Notes**: Enumerating the root located the actual questionnaire directory and the audit continued there.
---
## [ERR-20260920-034] project-python-document-parser-missing
**Logged**: 2026-09-20
**Priority**: low
**Status**: resolved
**Area**: dependencies
### Summary
The project research environment does not include `python-docx`, `pypdf`, or `pdfplumber`, so an exploratory source-extraction import failed.
### Error
`ModuleNotFoundError: No module named 'docx'`.
### Context
These packages are available in the Codex bundled document runtime. The final component audit uses only the project standard library and records verified source paths, pages/sections, and hashes, so it does not introduce an undeclared runtime dependency.
### Suggested Fix
Use the bundled read-only document runtime for source inspection unless document parsing becomes a reproducible project pipeline dependency; only then add and lock the packages in the project environment.
### Metadata
- Reproducible: yes
- Related Files: `research/stage1/gshs_primary_outcome_component_audit.json`
- Pattern-Key: dependency.optional-document-parser
### Resolution
- **Resolved**: 2026-09-20
- **Notes**: Source text was extracted with the bundled runtime and key PDF pages were rendered with Poppler for visual verification.
---
## [ERR-20260920-033] repeated-gshs-pandas-memory-exhaustion
**Logged**: 2026-09-20
**Priority**: medium
**Status**: resolved
**Area**: runtime
### Summary
An exploratory pandas cross-tab scan again exhausted memory while parsing the 637-column GSHS CSV.
### Error
`pandas.errors.ParserError: Error tokenizing data. C error: out of memory`.
### Context
This is a recurrence of `ERR-20260920-029` during a new component-level relation check. The source file was not changed.
### Suggested Fix
Use a streaming `csv.reader` scan with fixed column indices for all full-file GSHS audits.
### Metadata
- Reproducible: yes
- Related Files: `research/stage1/audit_gshs_primary_outcome_components.py`
- Pattern-Key: runtime.memory-exhaustion
- Related Error: `ERR-20260920-029`
- Recurrence Count: 2
### Resolution
- **Resolved**: 2026-09-20
- **Notes**: The streaming audit completed all 673,499 rows, all 191 components, and all three raw/binary relationship checks without a dense pandas load.
---
## [ERR-20260920-032] samhsa-pdf-direct-fetch-forbidden