Skip to content

List the SCF education-debt fit tables as release artifacts - #1546

Closed
MaxGhenis wants to merge 1 commit into
mainfrom
fsa-fit-files-as-release-artifacts
Closed

MaxGhenis wants to merge 1 commit into
mainfrom
fsa-fit-files-as-release-artifacts

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Follow-up to #1357 (microcosm#1074, the student debt pilot).

A --scf-education-debt build writes two fit tables under the artifact root: us_scf_education_debt_fit.json at the pre-calibration weights while it stages the debt, and us_scf_education_debt_calibrated_fit.json at the calibrated weights after the solve. Its release manifest listed neither. The publisher uploads only contract files, manifest artifacts and --extra-file entries, so neither table reached a published release, including the share of households with debt at the weights the release ships.

Changes

  • US_SCF_EDUCATION_DEBT_FIT_ARTIFACTS maps each table's manifest key to its filename.
  • _build_manifests(scf_education_debt_fit=True) lists both tables as diagnostics artifacts, and with False it lists neither; _main passes args.scf_education_debt. The publisher reads root artifacts from --artifact-root, so a publish uploads both tables beside the H5.
  • _REASON_LOAN_TYPE_DOLLARS adds "consolidated or not", as the Calibrate federal student loan balances to Federal Student Aid's portfolio (#1074) #1357 approval suggested. The fact-to-target doc says the manifest lists both tables, and its Parent PLUS bullet rewraps to the doc's width.

Invariants

  • The release manifest lists both fit tables if and only if the run staged the SCF education debt.
  • Each listed table's sha256 equals the sha256 of the file's bytes under the artifact root, and _release_manifest_root_artifacts reports it, so the publisher uploads it from there.
  • A staged run missing either table raises FileNotFoundError naming the file before it writes release_manifest.json.

Every non-dry run with the flag writes both tables: _with_scf_education_debt_stage gets a fit_path whenever dry_run is None, and the calibrated table follows the solve. A dry run returns before the manifests, so a run never lists a stale table that an earlier attempt left behind.

Tests

test_us_fiscal_refresh_builder.py adds three tests:

  • With both files present, the manifest lists both entries with their hashes when the run staged the debt and neither when it didn't. The contract's manifest and local-hash checks pass either way.
  • A staged run missing the calibrated table raises and writes no release manifest.
  • An AST check confirms that _main passes scf_education_debt_fit=args.scf_education_debt.

The tests fail on both mutants I tried, one that never lists the tables and one where _main always passes True. Locally, the builder tests and the three test files that read the edited module and doc pass on two workers (405 passed, 8 skipped), and tools/ci_test_plan.py verify passes. The receipts in experiments/ keep the reason text of the run that wrote them.

🤖 Generated with Claude Code

A --scf-education-debt build writes both fit tables under the artifact
root, but its release manifest listed neither, so no publish uploaded
them. _build_manifests now lists both as diagnostics artifacts exactly
when the run staged the SCF education debt, and raises if either file is
missing. The loan-type reason adds "consolidated or not", and the
fact-to-target doc says the manifest lists both tables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

I'm closing this in favor of #1545, which David opened first. #1545 writes both tables into the release directory, so the publisher uploads each one under releases/<id>/ with its own release. This PR keeps them in the artifact root, so the publisher would write them to the repository root, and nothing removes them when a later release leaves them out.

This PR's two other edits, "consolidated or not" in _REASON_LOAN_TYPE_DOLLARS and a rewrap in docs/us-fact-to-target.md, can follow #1545 in a small PR.

@MaxGhenis MaxGhenis closed this Nov 9, 2026
@MaxGhenis
MaxGhenis deleted the fsa-fit-files-as-release-artifacts branch November 9, 2026 02:28
DTrim99 added a commit that referenced this pull request Nov 9, 2026
…nt PLUS bullet (#1074)

The two edits from #1546 that #1545 didn't carry, as the comment closing
#1546 suggested.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Nov 13, 2026
* Publish a --scf-education-debt release's two fit tables

The release tool wrote us_scf_education_debt_fit.json and
us_scf_education_debt_calibrated_fit.json into its artifacts directory,
and the release manifest listed neither, so the publisher left both on
the run host. Write them into the release directory and list them as
diagnostics artifacts when the build ran with --scf-education-debt, and
only then, so the publisher uploads them under releases/<id>/ without
--extra-file. A flagged build missing either table fails before it
writes a manifest. Route A's publisher call needs no --extra-file; its
comment and runbook now say why (#1074, #1357 review).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Say "consolidated or not" in the loan-type reason and rewrap the Parent PLUS bullet (#1074)

The two edits from #1546 that #1545 didn't carry, as the comment closing
#1546 suggested.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Say the build-folder publisher puts the fit tables in the build's folder

Since #1571 the US releases publish through microcosm-publish-release-build,
which puts each build in releases/<release>/<build>/ and publishes every
artifact the release manifest lists. The docs, changelog, builder comment
and test docstring said the publisher uploads the tables under
releases/<id>/. The builder comment also says a build missing a fit table
writes neither manifest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Max Ghenis <mghenis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant