fix(telos): unified TELOS.md must take precedence over legacy per-topic files - #1809
Open
0bsolescence wants to merge 1 commit into
Open
fix(telos): unified TELOS.md must take precedence over legacy per-topic files#18090bsolescence wants to merge 1 commit into
0bsolescence wants to merge 1 commit into
Conversation
readTelosFile() checked the legacy per-file path FIRST and only fell through to
the unified TELOS.md section when the file was absent. ScaffoldUser copies the
legacy template stubs into every fresh install, so those stubs always existed
and always shadowed the user's real TELOS.md.
Effect: the documented 'TELOS.md is the single source of truth as of 2026-05-01'
was never true for a new install. PRINCIPAL_TELOS.md, which is @-imported at
every session start, silently rendered '(sample)' template data instead of the
user's content, or tripped the zero-items guard and refused to generate at all.
Inverts the precedence: prefer the unified section whenever it carries content,
falling back to the per-file path for installs that predate unification.
Verified three ways on a live install:
- stub present + TELOS.md section present -> TELOS.md wins (was: stub won)
- TELOS.md section absent, stub present -> identical output to unpatched
upstream, so the legacy path is not regressed
- normal case -> unchanged
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.
Problem
readTelosFile()checks the legacy per-topic path first and only falls through to the unifiedTELOS.mdsection when that file is absent:ScaffoldUsercopies the legacy template stubs into every fresh install, so those files always exist and always win. The documented contract thatLIFEOS/USER/TELOS/TELOS.mdis the single source of truth as of 2026-05-01 is therefore never true on a new install.Observed on 7.28.3: after writing a real
TELOS.md,PRINCIPAL_TELOS.mdrendered(sample)template content, andMISSION.mdtripped the zero-items guard so the summary refused to generate at all.Fix
Prefer the unified section whenever it carries content; fall back to the per-file path otherwise, preserving back-compat for pre-unification installs.
Verification
Three cases on a live install:
TELOS.mdsection present →TELOS.mdwins (previously the stub won)TELOS.mdsection absent, stub present → output byte-identical to unpatched upstream, confirming the legacy path is not regressedFound and fixed with AI assistance while installing 7.28.3; verified on a live install rather than by inspection.