Remove legacy_density mode, compat/, and validate_packet alias#129
Merged
WhatsYourWhy merged 1 commit intomainfrom Apr 19, 2026
Merged
Remove legacy_density mode, compat/, and validate_packet alias#129WhatsYourWhy merged 1 commit intomainfrom
WhatsYourWhy merged 1 commit intomainfrom
Conversation
Single-code-path simplification pass. v0.2 carried a `legacy_density`
salience-mode branch as "one-release migration support"; that release
never came. Removing it.
Removed:
- `temporal_gradient/compat/` — CANONICAL_MODE / LEGACY_DENSITY_MODE
constants, legacy packet fallback keys, density-to-psi normalizer,
schema-version coercer.
- `ClockRateModulator.salience_mode`, `legacy_density_scale`, and
`input_context` kwargs; `calculate_information_density()` and
`_psi_from_legacy_density()` helpers.
- `ConfigClock.salience_mode` / `legacy_density_scale` fields and the
matching keys from `DEFAULTS` and `tg.yaml`.
- `validate_packet_schema(salience_mode=...)` kwarg — there is now one
mode.
- `validate_packet()` compatibility alias (use `validate_packet_schema`).
- `ChronometricVector.from_packet(salience_mode=...)` and its legacy
branch that read `t_obj` / `r` / `legacy_density` keys.
- `normalize_schema_version("1")` legacy migration — only `"1.0"` now.
- `tests/fixtures/packets/legacy.jsonl`.
- `ClockTickRequest.input_context` field.
Callers updated: `anomaly_poc.py`, `sanity_harness.py`,
`calibration_harness.py`, `README.md`, `docs/usage.md`.
Tests updated/simplified: 13 test files touched to drop
`salience_mode="canonical"` kwargs, `legacy_density_scale` params, and
the schema-version "1" legacy-migration cases.
166 tests passing (was 170; 4 removed tests exercised legacy-only
code paths).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 19, 2026
WhatsYourWhy
added a commit
that referenced
this pull request
Apr 19, 2026
## Summary Cuts v0.3.0. Three things: 1. **License → MIT.** The prior bespoke "source-available, no execute" clause actively discouraged engagement with a public-portfolio repo. Replaced with standard MIT. 2. **Version bump 0.2.0 → 0.3.0** in \`pyproject.toml\`, \`temporal_gradient/__init__.py\`, and the version-check test. The merged cleanup PRs (#128, #129, #130) were breaking on the API surface (removed \`salience_mode\` kwargs, \`validate_packet\` alias, moved entrypoints), so this is 0.x-minor-bump territory. 3. **CHANGELOG rewrite.** The Unreleased block was stale — referenced \`docs/CANONICAL_VS_LEGACY.md\` and \`docs/archive/\` (both deleted) and documented a \`chronolog\` typo alias that's also gone. Replaced with a dated v0.3.0 section covering the full cleanup pass, plus a migration checklist for the breaking changes. Also applied **out of band** (repo settings, not a file change): - **Squash-merge set as the only allowed merge method** on \`WhatsYourWhy/The-Temporal-Gradient\` (merge commits + rebase disabled). - **Squash commit title** defaults to PR title; **squash commit message** defaults to PR body. Auto-merge and delete-branch-on-merge enabled. - Net effect: every future PR — including \`claude/...\`, \`codex/...\`, and \`alert-autofix-*\` bot branches — lands as a single clean commit named after the PR title. \`git log --oneline\` will tell an engineering story going forward. Historical bot merges on \`main\` are left as-is (rewriting merged history isn't worth it). Supersedes #131. ## Test plan - [x] \`pytest -q\` → 166 passed locally - [x] CI green on 3.10 / 3.11 / 3.12 - [x] After merge: tag \`v0.3.0\` and create a GitHub release pointing at the new CHANGELOG section Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Single-code-path simplification. v0.2 carried a
legacy_densitysalience-mode branch as a one-release migration path; that release
never came. This PR removes the entire parallel mode.
166 tests passing (was 170; the 4 removed tests exercised
legacy-only code paths).
What changed
Deleted:
temporal_gradient/compat/—CANONICAL_MODE/LEGACY_DENSITY_MODEconstants,
LEGACY_REJECTED_CANONICAL_KEYS,LEGACY_PACKET_FALLBACK_KEYS,normalize_legacy_density_to_psi,coerce_legacy_schema_version,legacy_packet_value.ClockRateModulator(salience_mode=..., legacy_density_scale=...)kwargs and the
input_contexttick argument.calculate_information_density()and_psi_from_legacy_density()helpers on the clock.
ConfigClock.salience_mode/legacy_density_scalefields + theirentries in
DEFAULTSandtg.yaml.validate_packet_schema(salience_mode=...)kwarg (there is one modenow).
validate_packet()compatibility alias — callers usevalidate_packet_schema.ChronometricVector.from_packet(salience_mode=...)and its legacybranch that read
t_obj/r/legacy_densitykeys.normalize_schema_version(\"1\")legacy migration — only\"1.0\"accepted.tests/fixtures/packets/legacy.jsonl.ClockTickRequest.input_contextfield.Updated callers:
anomaly_poc.py,sanity_harness.py,calibration_harness.py,README.md,docs/usage.md.Tests simplified: 13 test files stripped of
salience_mode=\"canonical\"kwargs,
legacy_density_scaleparams, and schema-version-"1"migration cases.
Why
From the prior audit on #128:
This is that PR.
Reviewer notes
any real caller used).
YAML line, drop a test parameter, drop a legacy-branch test.
Test plan
pytest -q→ 166 passed locally