feat: Add runnable MVP experiments for Q107, Q109, and Q125#132
feat: Add runnable MVP experiments for Q107, Q109, and Q125#132Zaious wants to merge 3 commits intoonestardao:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: caee4bd627
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "results = [(name, flow, delta_s(flow, G_anchor), zone_label(delta_s(flow, G_anchor))) for name, flow, _ in records]\n", | ||
| "results.sort(key=lambda x: x[2], reverse=True)\n", | ||
| "\n", | ||
| "print(f'{'Country':<35} {'Net Migration':>16} {'ΔS':>6} {'Zone'}')\n", |
There was a problem hiding this comment.
Fix invalid f-string in table header print
This header line is a syntax error (f-string: expecting '}') because the outer single-quoted f-string immediately conflicts with the inner single-quoted string literals. As soon as this cell is executed, the notebook stops at parse time, so the Q109 MVP cannot run despite being documented as runnable.
Useful? React with 👍 / 👎.
| "WB_URL = ('https://api.worldbank.org/v2/country/all/indicator/SM.POP.NETM'\n", | ||
| " '?format=json&mrv=1&per_page=50')\n", |
There was a problem hiding this comment.
Request full country set from the API
The URL hard-codes per_page=50, so the experiment computes G_anchor, rankings, and zone counts from only a partial first page rather than the full country population described in the notebook text. This skews the global median and downstream ΔS classifications, producing systematically incomplete results for the migration-tension analysis.
Useful? React with 👍 / 👎.
…109 notebook P1: Replace invalid f-string (single-quote collision) with str.format() P2: Change per_page=50 to per_page=300 to fetch all ~190 countries Update coverage description to reflect full dataset Addresses Codex automated review feedback
MontaEllis8
left a comment
There was a problem hiding this comment.
✅ Code Review 通过
MVP 实验添加,代码结构清晰。
建议合并。
|
Thanks a lot for the PR. I really appreciate the effort here. Overall this is very good work, and I think the MVP direction is strong. I only want to ask for a few very small fixes before merge:
These should all be small edits only. I am not asking for major changes. Once these little parts are cleaned up, it should be in a much better place. The rest I can handle on my side later. Thanks again. Really nice contribution. |
…ange note
Q107: Replace Q107_A/B.ipynb references with Q107_collective_action_demo.ipynb.
Rewrite setup sections from future-tense template to accurate present-tense.
Q109: Correct data source attribution (World Bank API, not UN/IOM/OECD).
Update ΔS zone list to four zones: SAFE, TRANSITIONAL, RISK, DANGER
with explicit threshold values.
Q125: Replace Q125_A/B.ipynb references with Q125_multi_agent_dynamics_demo.ipynb.
Rewrite setup sections to present-tense. Add ΔS display/range note
explaining 0-1 scale and SAFE/RISK/DANGER thresholds.
Addresses maintainer review feedback.
|
Thanks for the detailed feedback! All four points have been addressed: README files now reference the actual notebook filenames and use present-tense wording throughout. |
(Note: Infrastructure adapters to support WFGY semantic monitoring across frameworks were submitted recently in my related PR -> #131 )
Summary
This PR contributes runnable MVP experiment notebooks and architectural blueprints for three S-Class Tension Universe problems (Q107, Q109, Q125). The experiments are located strictly within
TensionUniverse/Experiments/and employ standalone SIMULATION_MODEL.md / DATA_SOURCE.md files to clearly expose the mathematical bounds and APIs (e.g., World Bank Open Data) used. This matters because it provides concrete, reproducible toy models that translate WFGY abstracts into inspectable Python logic, expanding the verifiable TU ecosystem.What this PR changes
Check all that apply.
Affected surfaces
List the main files or pages touched by this PR.
TensionUniverse/Experiments/Q107_MVP/(Notebook & Docs)TensionUniverse/Experiments/Q109_MVP/(Notebook & Docs)TensionUniverse/Experiments/Q125_MVP/(Notebook & Docs)Why this matters
Explain why this change is useful.
SIMULATION_MODEL) strictly according to TensionUniverse/Contribute/README.md standards.Linked issue
If this PR is related to an issue, link it here.
Public proof or evidence
Not applicable.
Screenshots or render checks
Not applicable.
Non-claims and boundaries
State anything this PR does not prove or should not be read as proving.
Checklist