Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
589 commits
Select commit Hold shift + click to select a range
30ee508
Merge pull request #10 from kwyjad/codex/create-resolver-skeleton-fol…
kwyjad Sep 30, 2025
3d20f10
Update A2 resolution policy with PIN/PA guidance
kwyjad Sep 30, 2025
ad14320
Merge pull request #11 from kwyjad/codex/update-resolution-policy-for…
kwyjad Sep 30, 2025
2470c62
Add resolver data dictionary and governance docs
kwyjad Sep 30, 2025
776db21
Merge pull request #12 from kwyjad/codex/add-data-dictionary-and-gove…
kwyjad Sep 30, 2025
d103a22
Add resolver facts validator and schema
kwyjad Sep 30, 2025
d8e3f14
Merge pull request #13 from kwyjad/codex/add-lightweight-validator-fo…
kwyjad Sep 30, 2025
52f81b0
add countries and shock/hazard lists
kwyjad Sep 30, 2025
1c3ac29
Merge branch 'main' of https://github.com/kwyjad/Spagbot_metac-bot
kwyjad Sep 30, 2025
a16627b
feat(resolver): add monthly snapshot freezer
kwyjad Sep 30, 2025
e29caae
Merge pull request #14 from kwyjad/codex/add-monthly-snapshot-freezer…
kwyjad Sep 30, 2025
74cba48
Add facts exporter tooling and staging sample
kwyjad Sep 30, 2025
309584e
Merge pull request #15 from kwyjad/codex/add-facts-exporter-script-an…
kwyjad Sep 30, 2025
ba81ae1
Add ingestion stub scaffolding
kwyjad Sep 30, 2025
ba49bbd
Merge pull request #16 from kwyjad/codex/add-ingestion-readme-and-che…
kwyjad Sep 30, 2025
78b25e7
test
kwyjad Sep 30, 2025
9f64e11
Merge branch 'main' of https://github.com/kwyjad/Spagbot_metac-bot
kwyjad Sep 30, 2025
e44d05c
Add ingestion scaffold definition of done
kwyjad Sep 30, 2025
acbf240
Merge pull request #17 from kwyjad/codex/add-ingestion-readme-and-stu…
kwyjad Sep 30, 2025
6d898c0
Add extended ingestion source stubs
kwyjad Sep 30, 2025
decf626
Merge pull request #18 from kwyjad/codex/add-comprehensive-source-stu…
kwyjad Sep 30, 2025
ae17429
Add precedence engine for resolver cutoff selection
kwyjad Sep 30, 2025
c07ecce
Merge pull request #19 from kwyjad/codex/add-precedence-engine-implem…
kwyjad Sep 30, 2025
8fe690d
Add stub data for new sources and update facts export
kwyjad Sep 30, 2025
a599ea6
Normalize run_one_question inputs and classifier output
kwyjad Sep 30, 2025
5f2c487
Merge pull request #20 from kwyjad/codex/add-json-normalization-and-e…
kwyjad Sep 30, 2025
9fbe486
nothing
kwyjad Sep 30, 2025
d665014
Add resolver CLI for country and hazard lookups
kwyjad Sep 30, 2025
5eb79c8
Merge pull request #21 from kwyjad/codex/add-resolver-cli-for-metrics…
kwyjad Sep 30, 2025
f10045b
Fix research meta dict handling and guard requests import
kwyjad Sep 30, 2025
80b5240
Spagbot Merge pull request #22 from kwyjad/codex/fix-run_one_question…
kwyjad Sep 30, 2025
7c5c10c
cache updates
kwyjad Sep 30, 2025
9b37fbe
Harden question pipeline dict coercion and Gemini handling
kwyjad Sep 30, 2025
b3f9914
Merge pull request #23 from kwyjad/codex/harden-run_one_question-pipe…
kwyjad Sep 30, 2025
b2a0782
chore: auto-reconcile poetry lock in ci
kwyjad Sep 30, 2025
f696a89
Merge pull request #24 from kwyjad/codex/update-ci-to-reconcile-poetr…
kwyjad Sep 30, 2025
642efec
Add FastAPI resolver endpoint and docs
kwyjad Sep 30, 2025
a7f4377
Merge pull request #25 from kwyjad/codex/add-fastapi-http-resolver-en…
kwyjad Sep 30, 2025
566e17c
updated exports
kwyjad Sep 30, 2025
8b96114
chore(deps): refresh poetry.lock [skip ci]
github-actions[bot] Sep 30, 2025
70cca0f
Add resolver review queue tooling
kwyjad Sep 30, 2025
a72d49a
Merge pull request #26 from kwyjad/codex/add-review-queue-and-applier…
kwyjad Sep 30, 2025
346b15c
Add new hazard facts and update resolved exports
kwyjad Sep 30, 2025
dbd97f9
Merge branch 'main' of https://github.com/kwyjad/Spagbot_metac-bot
kwyjad Sep 30, 2025
011ef80
Handle empty diagnostics file in review queue
kwyjad Sep 30, 2025
2827680
Merge pull request #27 from kwyjad/codex/fix-empty-diagnostics-file-h…
kwyjad Sep 30, 2025
fd1d460
Update ingested_at timestamps for fact stubs
kwyjad Sep 30, 2025
47494b6
Merge branch 'main' of https://github.com/kwyjad/Spagbot_metac-bot
kwyjad Sep 30, 2025
62f6e35
Update facts exports and add review CSVs
kwyjad Sep 30, 2025
ac2cbfa
Fix seen_guard availability handling
kwyjad Sep 30, 2025
31a6e40
Merge pull request #28 from kwyjad/codex/fix-run_one_question-wrapper…
kwyjad Sep 30, 2025
44545c7
Improve error diagnostics in run_one_question
kwyjad Sep 30, 2025
19c154b
Merge pull request #29 from kwyjad/codex/fix-exception-handler-to-sho…
kwyjad Sep 30, 2025
d708aab
Create topic_classify__q38861.json
kwyjad Sep 30, 2025
f12b0a4
fix: harden Grok errors and refresh poetry lock in CI
kwyjad Sep 30, 2025
4274408
Merge pull request #30 from kwyjad/codex/fix-grok-stability-issues-an…
kwyjad Sep 30, 2025
cd10950
chore(logs): append forecasts & run logs
kwyjad Sep 30, 2025
505bbd6
update
kwyjad Sep 30, 2025
4df03fc
Log market snapshot details in human logs
kwyjad Sep 30, 2025
55cdefc
Merge pull request #31 from kwyjad/codex/update-spagbot-logging-for-m…
kwyjad Sep 30, 2025
0349a91
chore(logs): append forecasts & run logs
github-actions[bot] Oct 1, 2025
1f00ba8
feat: Metaculus Cup forecasts [skip ci]
github-actions[bot] Oct 1, 2025
3a273b1
chore(logs): append forecasts & run logs
github-actions[bot] Oct 1, 2025
3389171
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 1, 2025
fa303cb
chore(logs): append forecasts & run logs
github-actions[bot] Oct 1, 2025
59ded3d
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 1, 2025
deb1acc
chore(resolver): commit CI state artifacts
kwyjad Oct 1, 2025
115e877
Merge pull request #32 from kwyjad/codex/update-ci-to-commit-outputs-…
kwyjad Oct 1, 2025
b992687
test(resolver): add data contract tests and CI hook
kwyjad Oct 1, 2025
ad99b52
Merge pull request #33 from kwyjad/codex/add-pytest-test-suite-for-da…
kwyjad Oct 1, 2025
ffd261b
feat(resolver): add ReliefWeb API connector
kwyjad Oct 1, 2025
4582da1
Merge pull request #34 from kwyjad/codex/add-reliefweb-client-and-ext…
kwyjad Oct 1, 2025
cc9109c
Update ReliefWeb client for v2 API requirements
kwyjad Oct 1, 2025
b6cb6a2
Merge pull request #35 from kwyjad/codex/update-reliefweb-api-integra…
kwyjad Oct 1, 2025
896a691
Update facts.parquet
kwyjad Oct 1, 2025
ba000d8
Merge branch 'main' of https://github.com/kwyjad/Spagbot_metac-bot
kwyjad Oct 1, 2025
f72da64
Improve ReliefWeb client robustness
kwyjad Oct 1, 2025
f12f1d8
Merge pull request #36 from kwyjad/codex/patch-reliefweb-client-for-r…
kwyjad Oct 1, 2025
605fd56
Harden ReliefWeb connector diagnostics and skip flow
kwyjad Oct 1, 2025
2f1a4b9
Merge pull request #37 from kwyjad/codex/update-reliefweb-connector-w…
kwyjad Oct 1, 2025
d8cf2d6
Handle ReliefWeb WAF challenge and document workaround
kwyjad Oct 1, 2025
4467636
Merge pull request #38 from kwyjad/codex/handle-aws-waf-challenge-in-…
kwyjad Oct 1, 2025
f85755f
feat: allow overriding ReliefWeb appname
kwyjad Oct 1, 2025
19510f9
Merge branch 'main' into codex/update-reliefweb-appname-and-env-override
kwyjad Oct 1, 2025
d3bc886
Merge pull request #39 from kwyjad/codex/update-reliefweb-appname-and…
kwyjad Oct 1, 2025
bdf4944
Update README.md
kwyjad Oct 1, 2025
a42f0b4
Add IFRC GO connector and config
kwyjad Oct 1, 2025
71904fe
Merge pull request #40 from kwyjad/codex/add-ifrc-go-admin-v2-connector
kwyjad Oct 1, 2025
381ed5a
Update resolver-ci.yml
kwyjad Oct 1, 2025
e09bd0d
Request GO details fields and add connector header test
kwyjad Oct 1, 2025
960b085
Merge pull request #41 from kwyjad/codex/fix-ifrc-go-admin-v2-details…
kwyjad Oct 1, 2025
24d3f53
updates
kwyjad Oct 1, 2025
5a93b97
Merge branch 'main' of https://github.com/kwyjad/Spagbot_metac-bot
kwyjad Oct 1, 2025
3b90b4e
Window IFRC GO pagination and update docs
kwyjad Oct 1, 2025
ee2235c
Merge pull request #42 from kwyjad/codex/implement-paging-and-debug-e…
kwyjad Oct 1, 2025
41a5c1c
Make connector header tests hermetic
kwyjad Oct 1, 2025
d8428ab
Merge pull request #43 from kwyjad/codex/update-hermetic-connector-he…
kwyjad Oct 1, 2025
744f3a8
chore: address resolver review items
kwyjad Oct 1, 2025
8dfe6c0
Merge pull request #44 from kwyjad/codex/address-codex-review-items-i…
kwyjad Oct 1, 2025
92ce1a6
update artifacts
kwyjad Oct 1, 2025
7ce8a5b
chore: add resolver dev test bootstrap
kwyjad Oct 1, 2025
6cd6d31
Merge pull request #45 from kwyjad/codex/add-dev-bootstrap-for-tests
kwyjad Oct 1, 2025
2a440d8
updated artifacts
kwyjad Oct 1, 2025
5601075
feat(resolver): add UNHCR population connector and CI deps
kwyjad Oct 1, 2025
41e869d
Merge pull request #46 from kwyjad/codex/add-unhcr-population-api-con…
kwyjad Oct 1, 2025
0645324
Switch UNHCR connector to asylum applications endpoint
kwyjad Oct 1, 2025
35c6802
Merge pull request #47 from kwyjad/codex/update-unhcr-connector-to-as…
kwyjad Oct 1, 2025
8084d1e
Add UNHCR ODP connector and improve UNHCR asylum client
kwyjad Oct 1, 2025
827eff0
Merge pull request #48 from kwyjad/codex/add-unhcr-odp-connector-for-…
kwyjad Oct 1, 2025
d188f79
artifacts update
kwyjad Oct 1, 2025
7575577
chore(logs): append forecasts & run logs
github-actions[bot] Oct 1, 2025
f66c2ff
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 1, 2025
7d6e645
chore(logs): append forecasts & run logs
github-actions[bot] Oct 1, 2025
d597137
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 1, 2025
1379836
chore(logs): append forecasts & run logs
github-actions[bot] Oct 2, 2025
2e1c71e
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 2, 2025
eced088
Add HDX connector with monthly PIN ingestion
kwyjad Oct 2, 2025
2b76d4e
Merge pull request #49 from kwyjad/codex/add-hdx-connector-for-monthl…
kwyjad Oct 2, 2025
32ef4c4
Add monthly deltas builder and snapshot support
kwyjad Oct 2, 2025
7d7d481
Merge pull request #50 from kwyjad/codex/add-delta-generation-for-mon…
kwyjad Oct 2, 2025
fa114b5
Extend validator for series metadata
kwyjad Oct 2, 2025
26aead1
Merge pull request #51 from kwyjad/codex/extend-schema-and-validator-…
kwyjad Oct 2, 2025
01aa790
Ensure monthly state includes deltas and tz-normalized ym
kwyjad Oct 2, 2025
0b2f147
Merge pull request #52 from kwyjad/codex/augment-repo-state-writer-fo…
kwyjad Oct 2, 2025
a2c5723
Add series selection and semantics metadata
kwyjad Oct 2, 2025
9ca49f2
Merge pull request #53 from kwyjad/codex/add-cli-switch-for-series-se…
kwyjad Oct 2, 2025
cc6a239
Document monthly end-to-end run order
kwyjad Oct 2, 2025
2a2342e
Merge pull request #54 from kwyjad/codex/add-cli-switch-for-series-se…
kwyjad Oct 2, 2025
f8072ad
Improve resolver fallbacks and delta handling
kwyjad Oct 2, 2025
ca86fe8
Merge pull request #55 from kwyjad/codex/fix-series-fallback-to-stock…
kwyjad Oct 2, 2025
0723886
Add DTM connector scaffolding with delta logic tests
kwyjad Oct 2, 2025
728cf0a
Merge pull request #56 from kwyjad/codex/add-iom-dtm-connector-with-d…
kwyjad Oct 2, 2025
6bbfe24
Add WHO PHE connector with monthly aggregation
kwyjad Oct 2, 2025
3eed234
Merge pull request #57 from kwyjad/codex/add-who-connector-for-public…
kwyjad Oct 2, 2025
a0b18c2
Add IPC connector with monthly expansion and delta tests
kwyjad Oct 2, 2025
e4a7c90
Merge pull request #58 from kwyjad/codex/add-ipc-connector-for-monthl…
kwyjad Oct 2, 2025
49fee59
fix: harden ingestion connectors
kwyjad Oct 2, 2025
0dfaab8
Merge pull request #59 from kwyjad/codex/fix-nan-handling,-restore-pa…
kwyjad Oct 2, 2025
a738a3c
Add EM-DAT connector with monthly allocation and tests
kwyjad Oct 2, 2025
4e561da
Merge pull request #60 from kwyjad/codex/add-em-dat-connector-with-mo…
kwyjad Oct 2, 2025
62da067
fix: guard UNHCR pagination and add ingestion mode
kwyjad Oct 2, 2025
47ea7a7
Merge pull request #61 from kwyjad/codex/guard-results-in-unhcr-pagin…
kwyjad Oct 2, 2025
a0321a9
chore(logs): append forecasts & run logs
github-actions[bot] Oct 2, 2025
59878de
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 2, 2025
2d93fa9
Prune unsupported hazards from registries
kwyjad Oct 2, 2025
5b1a7c5
Merge pull request #63 from kwyjad/codex/remove-earthquake-entry-from…
kwyjad Oct 2, 2025
9d8142b
Add GDACS connector with allocation and dedup tests
kwyjad Oct 2, 2025
a35fc4d
Merge pull request #64 from kwyjad/codex/add-gdacs-connector-for-mont…
kwyjad Oct 2, 2025
47617af
chore(logs): append forecasts & run logs
github-actions[bot] Oct 2, 2025
5b1b377
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 2, 2025
8916464
Add WFP mVAM connector with monthly aggregation
kwyjad Oct 2, 2025
8397691
Merge pull request #65 from kwyjad/codex/add-wfp-mvam-connector
kwyjad Oct 2, 2025
290fbe1
Add WorldPop denominators and percent conversions
kwyjad Oct 2, 2025
6051611
Merge pull request #66 from kwyjad/codex/add-worldpop-connector-for-p…
kwyjad Oct 2, 2025
d96e4d9
chore(logs): append forecasts & run logs
github-actions[bot] Oct 2, 2025
8e5708a
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 2, 2025
ed7f211
Add ACLED ingestion and remove conflict cessation hazard
kwyjad Oct 2, 2025
97d0678
Merge pull request #67 from kwyjad/codex/add-acled-connector-for-conf…
kwyjad Oct 2, 2025
553de2d
chore(logs): append forecasts & run logs
github-actions[bot] Oct 2, 2025
8f9969a
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 2, 2025
4226174
Add resolver artifact size guardrails
kwyjad Oct 2, 2025
d31d77c
Merge pull request #68 from kwyjad/codex/add-ci-size-checks-and-pruni…
kwyjad Oct 2, 2025
cdd45ef
chore(logs): append forecasts & run logs
github-actions[bot] Oct 3, 2025
cc8794b
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 3, 2025
eb89802
Add GPT context pack generator
kwyjad Oct 3, 2025
8054df8
Merge pull request #69 from kwyjad/codex/add-auto-generated-context-p…
kwyjad Oct 3, 2025
f58490f
Update cli.py
kwyjad Oct 3, 2025
f75d309
chore(ci): harden resolver workflow
kwyjad Oct 3, 2025
a5cb71d
Merge pull request #70 from kwyjad/codex/fix-resolver-ci-workflow-for…
kwyjad Oct 3, 2025
4d3acc6
Fix mVAM percent conversion to avoid admin overcount
kwyjad Oct 3, 2025
e6d4d2e
Merge pull request #71 from kwyjad/codex/fix-mvam-subnational-percent…
kwyjad Oct 3, 2025
9a353c0
x
kwyjad Oct 3, 2025
d5d72ec
Fix mVAM mixed indicator aggregation
kwyjad Oct 3, 2025
f56dd63
Merge pull request #72 from kwyjad/codex/fix-mvam-mixed-indicator-han…
kwyjad Oct 3, 2025
bf85431
Fix ingestion connectors for ACLED, GDACS, and EM-DAT
kwyjad Oct 3, 2025
57a1a1e
Merge pull request #73 from kwyjad/codex/fix-ingestion-issues-for-acl…
kwyjad Oct 3, 2025
342e93c
Fix per-ISO denominator year filtering
kwyjad Oct 3, 2025
c330584
Merge pull request #74 from kwyjad/codex/fix-denominator-year-filtering
kwyjad Oct 3, 2025
e5685cb
feat: stage pruned daily state deletions
kwyjad Oct 3, 2025
d314507
Merge pull request #75 from kwyjad/codex/stage-and-commit-daily-state…
kwyjad Oct 3, 2025
be58c26
Connector gating and UNHCR/ODP hardening
kwyjad Oct 3, 2025
87be187
Merge pull request #76 from kwyjad/codex/fix-connector-issues-in-inge…
kwyjad Oct 3, 2025
ce25432
chore(logs): append forecasts & run logs
github-actions[bot] Oct 3, 2025
c625a35
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 3, 2025
2a09bb8
Handle ReliefWeb WAF challenge with retries
kwyjad Oct 3, 2025
75fb7ee
Merge pull request #77 from kwyjad/codex/fix-reliefweb-ingestion-waf-…
kwyjad Oct 3, 2025
6a3c22e
Improve HDX CSV parsing stability
kwyjad Oct 3, 2025
0d0a191
Merge pull request #78 from kwyjad/codex/fix-hdx-csv-parsing-stabilit…
kwyjad Oct 3, 2025
a050652
Fix WFP mVAM init order
kwyjad Oct 3, 2025
5ea3b0d
Merge pull request #79 from kwyjad/codex/fix-mvam-module-initializati…
kwyjad Oct 3, 2025
2ac7eb3
chore(logs): append forecasts & run logs
github-actions[bot] Oct 3, 2025
59d8676
feat: AIB tournament forecasts [skip ci]
github-actions[bot] Oct 3, 2025
4c2f629
ci: harden resolver ingestion workflow
kwyjad Oct 3, 2025
ef420df
Merge pull request #80 from kwyjad/codex/fix-ci-stability-and-stub-ru…
kwyjad Oct 3, 2025
2695e9c
feat(resolver): refresh ACLED token and wire DTM API keys
kwyjad Oct 3, 2025
dfafda2
Merge pull request #81 from kwyjad/codex/integrate-acled-refresh-toke…
kwyjad Oct 3, 2025
78928ab
Clamp WFP mVAM percentages and add smoke coverage
kwyjad Oct 3, 2025
87ce6d1
Merge pull request #82 from kwyjad/codex/fix-nameerror-in-run_all_stu…
kwyjad Oct 3, 2025
1f109b8
docs(ingestion): document structured logging and retries
kwyjad Oct 3, 2025
e2cf0f6
Merge pull request #83 from kwyjad/codex/add-structured-logging-and-r…
kwyjad Oct 3, 2025
91f0b52
Fix real ingestion failure exit and ACLED token fallback
kwyjad Oct 3, 2025
8fc962e
Merge pull request #84 from kwyjad/codex/fix-ci-fail-on-error-and-leg…
kwyjad Oct 3, 2025
2a8d4ea
chore(ci): harden forecast workflows
kwyjad Oct 3, 2025
e9435ff
Merge pull request #85 from kwyjad/codex/fix-ci-lock-handling-and-saf…
kwyjad Oct 3, 2025
8814eb5
Improve ingestion connector retry classification
kwyjad Oct 3, 2025
78e0dc0
Merge pull request #86 from kwyjad/codex/fix-connector-retries-for-su…
kwyjad Oct 3, 2025
654c534
deleting old junk
kwyjad Oct 3, 2025
303513e
Implement configurable ACLED conflict onset rule
kwyjad Oct 3, 2025
c62b127
Merge pull request #87 from kwyjad/codex/implement-conflict-onset-rul…
kwyjad Oct 3, 2025
03d4213
Add generator for schema documentation
kwyjad Oct 3, 2025
44d3534
Merge pull request #88 from kwyjad/codex/add-script-to-auto-generate-…
kwyjad Oct 3, 2025
c101e27
chore(ci): update forecasts
github-actions[bot] Oct 3, 2025
648e4f9
chore(ci): update forecasts
github-actions[bot] Oct 3, 2025
feba36a
chore(ci): update forecasts
github-actions[bot] Oct 4, 2025
be8b8d5
Run ingestion connectors as modules
kwyjad Oct 4, 2025
38f6e20
Merge pull request #89 from kwyjad/codex/refactor-connectors-to-run-a…
kwyjad Oct 4, 2025
2aa2e82
Add ingestion logs and update resolver staging data
kwyjad Oct 4, 2025
b0a1643
Restore ingestion runner log directory
kwyjad Oct 4, 2025
84b5917
Merge pull request #90 from kwyjad/codex/restore-automatic-log-file-g…
kwyjad Oct 4, 2025
8566fd8
Harden ReliefWeb ingestion client
kwyjad Oct 4, 2025
24bffc4
Merge pull request #91 from kwyjad/codex/harden-reliefweb-client-impl…
kwyjad Oct 4, 2025
e074278
Merge branch 'main' of https://github.com/kwyjad/Spagbot_metac-bot
kwyjad Oct 4, 2025
64943e6
Add manifest support for ingestion outputs
kwyjad Oct 4, 2025
f2ccd98
Merge pull request #92 from kwyjad/codex/add-manifest-utility-for-tru…
kwyjad Oct 4, 2025
4786c75
Add UNHCR debug instrumentation and smoke test
kwyjad Oct 4, 2025
fb21dc8
Merge branch 'main' into codex/add-unhcr-data-debug-logging-and-tests
kwyjad Oct 4, 2025
33bf857
Merge pull request #93 from kwyjad/codex/add-unhcr-data-debug-logging…
kwyjad Oct 4, 2025
42cc3be
Add shared ingestion utilities and real hazard connectors
kwyjad Oct 4, 2025
6be90de
Merge pull request #94 from kwyjad/codex/add-shared-utilities-and-yam…
kwyjad Oct 4, 2025
4448f6d
Restore UNHCR registry signature and add helper
kwyjad Oct 4, 2025
22a4d53
Merge pull request #95 from kwyjad/codex/preserve-load_registries-sig…
kwyjad Oct 4, 2025
41225e5
Fix DTM admin dedup to respect as_of ordering
kwyjad Oct 4, 2025
3126578
Merge pull request #96 from kwyjad/codex/fix-dtm-dedup-to-skip-stale-…
kwyjad Oct 4, 2025
a2cec29
feat: add connector enable gating and CLI filters
kwyjad Oct 4, 2025
03c629a
Merge pull request #97 from kwyjad/codex/standardize-enable-flag-acro…
kwyjad Oct 4, 2025
6210b24
Improve DTM as_of handling and add tests
kwyjad Oct 4, 2025
33d0801
Merge pull request #98 from kwyjad/codex/use-true-per-record-as_of-fo…
kwyjad Oct 4, 2025
b23338e
Split resolver CI into fast smoke and nightly workflows
kwyjad Oct 4, 2025
19dcf06
Merge pull request #99 from kwyjad/codex/split-ci-into-fast-and-night…
kwyjad Oct 4, 2025
a04932a
Honor connector enable flags from actual config
kwyjad Oct 4, 2025
55fb1c3
Merge pull request #100 from kwyjad/codex/fix-wfp-mvam-config-enable-…
kwyjad Oct 4, 2025
239ef75
Restore gdacs_client public API facade
kwyjad Oct 4, 2025
2a66770
Fix UNHCR registry helper regression
kwyjad Oct 5, 2025
7ef26d1
Restore DTM client compatibility facade
kwyjad Oct 5, 2025
58ff2b1
Ensure skip guards emit header-only CSVs
kwyjad Oct 5, 2025
01dd413
Fix WorldPop facade and header writes
kwyjad Oct 5, 2025
d8c5afd
Restore IPC/WHO-PHE enablement and rebuild EM-DAT facade
kwyjad Oct 5, 2025
36b75c6
chore: ignore run artifacts (logs/staging/exports)
kwyjad Oct 5, 2025
c89933b
chore: stop tracking staging CSVs
kwyjad Oct 5, 2025
f1cda5a
update
kwyjad Oct 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
"customizations": {
"codespaces": {
"openFiles": [
"README.md",
"Dashboard/streamlit_app.py"
]
},
"vscode": {
"settings": {},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
]
}
},
"updateContentCommand": "[ -f packages.txt ] && sudo apt update && sudo apt upgrade -y && sudo xargs apt install -y <packages.txt; [ -f requirements.txt ] && pip3 install --user -r requirements.txt; pip3 install --user streamlit; echo '✅ Packages installed and Requirements met'",
"postAttachCommand": {
"server": "streamlit run Dashboard/streamlit_app.py --server.enableCORS false --server.enableXsrfProtection false"
},
"portsAttributes": {
"8501": {
"label": "Application",
"onAutoForward": "openPreview"
}
},
"forwardPorts": [
8501
]
}
179 changes: 168 additions & 11 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,168 @@
# Required
METACULUS_TOKEN=1234567890

# Optional
OPENROUTER_API_KEY=1234567890
PERPLEXITY_API_KEY=1234567890
OPENAI_API_KEY=1234567890
EXA_API_KEY=1234567890
ASKNEWS_CLIENT_ID=1234567890
ASKNEWS_SECRET=1234567890
ANTHROPIC_API_KEY=1234567890
############################################
# SPAGBOT — ENVIRONMENT VARIABLES
# Last updated: 2025-09-13 (Europe/Istanbul)
############################################

###############
# METACULUS
###############
METACULUS_TOKEN=xxx
METACULUS_INCLUDE_RESOLVED=0
TOURNAMENT_ID=fall-aib-2025
SUBMIT_PREDICTION=1

###############
# GENERAL
###############
GIT_SHA=

###############
# CONCURRENCY
###############
LLM_MAX_CONCURRENCY=4

###############
# LOGGING LIMITS
###############
HUMAN_LOG_MODEL_RAW_MAX_CHARS=5000
HUMAN_LOG_RESEARCH_MAX_CHARS=15000
RESEARCH_SNIPPET_MAX_CHARS=600
RESEARCH_LOG_ALL_CANDIDATES=1

###############
# FORECASTING KNOBS
###############
FORECAST_TEMP=0.00
FORECAST_TOP_P=0.10
GTMC1_ACTIVATION_THRESHOLD=0.50

###############
# RESEARCH KNOBS
###############
RESEARCH_TEMP=0.10
RESEARCH_TOP_P=0.90
REQUIRE_YEAR_IF_PRESENT=0
MIN_ANCHOR_MATCH=2
SALVAGE_MIN_MATCH=1

###############
# CALIBRATION
###############
CALIBRATION_PATH=calibration/calibration_state.json
CALIB_ADVICE_PATH=calibration/calibration_advice.json
CALIB_WEIGHTS_PATH=calibration/calibration_weights.json
SPAG_CALIB_K=1.0
SPAG_CALIB_BETA=0.50
SPAG_CALIB_HALFLIFE_DAYS=30

###############
# CSV / FILE PATHS
###############
FORECASTS_CSV_PATH=outputs/forecasts.csv
TEST_POSTS_FILE=data/test_posts.jsonl
TEST_POST_IDS=578,14333,22427,38195

###############
# MARKET SNAPSHOT
###############
ENABLE_MARKET_SNAPSHOT=1
MARKET_SNAPSHOT_MAX_MATCHES=10

###############
# PROVIDER TOGGLES
###############
USE_OPENROUTER=1
USE_GOOGLE=1
ENABLE_SERPER=1
ENABLE_SERPER_WEB=1
ENABLE_ASKNEWS=1
ENABLE_GROK=1

###############
# OPENROUTER (PRIMARY)
###############
OPENROUTER_API_KEY=xxx
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
OPENROUTER_FALLBACK_ID=openai/gpt-4o
OPENROUTER_GPT5_ID=openai/gpt-4o
OPENROUTER_GPT5_THINK_ID=openai/gpt-4o
OPENROUTER_CLAUDE37_ID=anthropic/claude-3.7-sonnet

# Alias sometimes used in code for OpenRouter:
OR_API_KEY=xxx

###############
# OPENAI DIRECT (optional; usually unused now)
###############
OPENAI_API_KEY=xxx
OPENAI_BASE_URL=https://openrouter.ai/api/v1

###############
# GEMINI (Google)
###############
GOOGLE_API_KEY=xxx
GEMINI_API_KEY=xxxx
GEMINI_MODEL=gemini-2.5-pro
GEMINI_MODEL_ID=gemini-2.5-pro
GEMINI_CALL_TIMEOUT_SEC=180
GPT5_CALL_TIMEOUT_SEC=180

###############
# GROK (xAI)
###############
XAI_API_KEY=xxx
XAI_BASE_URL=https://api.x.ai/v1
XAI_GROK_ID=grok-4
GROK_MODEL_ID=grok-4
GROK_CALL_TIMEOUT_SEC=180


###############
# OTHER PROVIDERS (optional)
###############
PERPLEXITY_API_KEY=
EXA_API_KEY=

###############
# CLASSIFIER / CACHES
###############
SPAGBOT_USE_LLM_CLASSIFIER=1
SPAGBOT_DISABLE_CLASSIFIER_CACHE=1
SPAGBOT_DISABLE_RESEARCH_CACHE=1
# Optional: one markdown file per run (no subfolder) is 1; blank means one file per question
HUMAN_LOG_FLAT=

# Log GitHub Commit config
HUMAN_LOG_EXT=md
DISABLE_GIT_LOGS=false
COMMIT_LOGS=true
GIT_LOG_MESSAGE="chore(logs): append forecasts & run logs"
GIT_REMOTE_NAME=origin
GIT_BRANCH_NAME=main

###############
# COST TRACKING (local use) USD per 1000 tokens
###############
MODEL_COSTS_JSON={
"openai/gpt-4o":{"prompt":2.5,"completion":10.0},
"anthropic/claude-3.7-sonnet":{"prompt":3.0,"completion":15.0},
"gemini-2.5-pro":{"prompt":1.25,"completion":10.0},
"grok-4":{"prompt":3.0,"completion":15.0}
}

###############
# RESOLVER CONNECTORS
###############
# ACLED credentials (prefer refresh token; helper exchanges it for a new access token)
ACLED_REFRESH_TOKEN=
# Optional fallbacks for manual authentication (avoid storing secrets when possible)
# ACLED_USERNAME=
# ACLED_PASSWORD=
# Legacy override; if set, treated as an access token
# ACLED_ACCESS_TOKEN=

# IOM DTM API keys
DTM_API_PRIMARY_KEY=
DTM_API_SECONDARY_KEY=
# Optional custom header name (defaults to x-api-key)
# DTM_API_HEADER_NAME=
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Normalize line endings
* text=auto

# Always use LF endings for shell scripts
*.sh text eol=lf

# Force LF for requirements.txt
requirements.txt text eol=lf

# Ensure hooks (in tracked .githooks folder) also use LF
.githooks/* text eol=lf
24 changes: 24 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
# Re-exec this script in bash (prefer WSL bash if available), because sh doesn't support 'pipefail'.
if [ -z "$BASH" ]; then
if command -v wsl.exe >/dev/null 2>&1; then
exec wsl bash "$0" "$@"
elif command -v bash >/dev/null 2>&1; then
exec bash "$0" "$@"
else
echo "pre-commit: bash not found; cannot run hook." >&2
exit 1
fi
fi

# Now we're in bash
set -euo pipefail

# Block committing these files unless OVERRIDE=1 is set
if git diff --cached --name-only | grep -E -q '^(forecasts\.csv|[Dd]ashboard/data/forecasts\.parquet)$'; then
echo "❌ Blocked: committing forecasts.csv or Dashboard/data/forecasts.parquet"
echo " (override with: OVERRIDE=1 git commit ...)"
if [ "${OVERRIDE:-}" != "1" ]; then
exit 1
fi
fi
54 changes: 54 additions & 0 deletions .github/workflows/build_dashboard_data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build dashboard data

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- "forecasts.csv" # ← only rebuild when the CSV changes

permissions:
contents: write # required so we can push the parquet back to the repo

jobs:
build-parquet:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install parquet deps
run: |
python -m pip install --upgrade pip
pip install pandas pyarrow

- name: Build Dashboard/data/forecasts.parquet
run: |
python - <<'PY'
import os, pandas as pd, pathlib
# Prefer the root CSV; fall back to forecast_logs if needed
candidates = ["forecasts.csv", "forecast_logs/forecasts.csv"]
path = next((p for p in candidates if os.path.exists(p)), None)
if not path:
raise SystemExit("Could not find forecasts.csv; adjust candidates.")

out_dir = pathlib.Path("Dashboard/data") # Capital D path
out_dir.mkdir(parents=True, exist_ok=True)

df = pd.read_csv(path, low_memory=False)
out_path = out_dir / "forecasts.parquet"
df.to_parquet(out_path, index=False)
print("✅ wrote", out_path, "rows:", len(df))
PY

- name: Commit updated parquet
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -f Dashboard/data/forecasts.parquet
git commit -m "chore(dashboard): refresh parquet snapshot" || echo "No changes"
git push
Loading