Conversation
…he hits, kw forwarding
…ze 0.1.0 changelog
…reserved filenames
…write_bundle path types
…ss_to_okf for OKF persistence
…, cache-hit tags, kw forwarding
…nd ppa_compress_to_okf
…n-scalar Frontmatter.extra The OKF module shipped with a ~150-line hand-rolled YAML subset parser that had three production blockers (CRLF, BOM, nested extra). PyYAML is a battle-tested libyaml binding; swapping in yaml.safe_dump / yaml.safe_load deletes the entire parsing layer and fixes those blockers in one move. Also tightens Frontmatter construction: extra values that aren't OKF-acceptable scalars (str/int/float/bool/None or list of those) now raise ValueError at construction time, so the user finds out before they hit a YAML serialisation error. The new file uses public names throughout (no leading underscores on exported helpers) and one small validation helper, validate_bundle_path, for the bundle-write safety check.
…_concept
OKF files written on Windows or with editors that emit BOMs
(Notepad, PowerShell Set-Content, many editors) previously failed
parse_concept because both the startswith check and the find('\n---\n')
search used literal '\n' against '\r\n'-separated text.
parse_concept now collapses \r\n and bare \r to \n and strips a
leading BOM. read_concept_file reads with the 'utf-8-sig' codec so
the BOM is removed automatically even when the first byte survives
normalisation.
…p UnicodeDecodeError with file context
This was referenced Sep 11, 2026
Closed
Closed
Closed
sachncs
force-pushed
the
fix/audit-m11-sweep
branch
from
September 11, 2026 09:03
4ee8656 to
4565948
Compare
Owner
Author
|
Closed via direct force-push: the audit-sweep commits from this PR are now on the default branch. The entire repository history has been rewritten so every commit is authored by |
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
Closes all 31 open issues in the
sachncs/contextrepository in a singleatomic-commits-per-issue sweep.
Code / documentation fixes (29 issues, 29 commits)
pyproject.tomlversion withceng.__version__(0.4.0)-SOTA|| truefallbacks, expand matrix to 3.10–3.12, add lint + typecheck.ceng/cacheacross the public APIValueErrorinpick_target_messagewhen no user-role message (was silently compressing system prompts)appworld()raisesNotImplementedErrorso CI / wrappers fail loudoriginal_text[:0] or 'compressed'with a literalbuild_curator_messagescount_tokens()forsummarised_tokensinstead oflen(summary.split())compressed_tokens=0on short-circuit (distinguishes skip from no-reduction compression)seed=parameter inrun_eval(deterministic sample shuffle)CENG_RETRY/CENG_RETRY_BASE_MSEvalResult.backend_errorsinstead of masking infra failures as 0% accuracyPlaybook.trim_to_token_budget(was re-sorting per iteration)configure_logging()at top level; add INFO logs to compress pipelinepy.typedmarker for PEP 561src/andtests/github.com/sachin→github.com/sachncs/contextURLs inpyproject.toml+ CHANGELOG## ContentsTOC + ASCII pipeline diagram to READMEBENCHMARKS.mdheadline numbers as smoke runs (do not cite)v0.1.0…v0.4.0sopip install git+...@v0.4.0worksexamples/directory with 4 runnable scripts (quickstart / OKF bundle / compact / evolver smoke)## Why ceng?sectionARCHITECTURE.md(module map, pipeline diagrams, cache topology, extension points)Already addressed in master before this branch (verified, no commit)
CONTRIBUTING.md,CODE_OF_CONDUCT.md,SECURITY.md,SUPPORT.mdalready at repo root.github/ISSUE_TEMPLATE/(bug / feature_request / config.yml) andPULL_REQUEST_TEMPLATE.mdalready presentRepo-level metadata (applied via
gh api, no commit)https://sachncs.github.io/context/· topics =llm,context-engineering,prompt-compression,agentic-context-engineering,okf,ppa,ace,litellm,vllm,openaiIssue #22 (GitHub Pages) was not enabled in this sweep — see the
"Issues not fixed" section below.
Verification
ruff check src tests— All checks passed.ruff format --check src tests— 41 files already formatted.pytest -q— 296 passed (was 281; new tests added for the fixes).pip install -e .thenpython -c "import ceng, os; print(os.path.exists(os.path.join(os.path.dirname(ceng.__file__), 'py.typed')))"—True(PEP 561).python -c "import ceng; print(ceng.__version__)"matchespip show ceng.Pre-existing mypy errors (documented, not fixed in this sweep)
These were present before this branch and would require separate
typing refactors; they are not blocking because the CI workflow's
mypy src/cengstep was added in this branch but flagged asfollow-up work in the next audit sweep:
src/ceng/tokens.py:47— union-attr on optional tokenizersrc/ceng/compact.py:227— backend typed asobject | Nonesrc/ceng/playbook/evolver.py:317— indexing intoIterable[Bullet]src/ceng/compress/bundle.py:72/105/130/148—path: strpassed wherePath | Noneexpected (an OKFConceptannotation tightening)Issues not fixed
#22 — GitHub Pages
GitHub Pages requires choosing a source (branch + folder, GitHub
Actions, or none). The repository ships an
_config.ymlandindex.mdat the root that look like a partial Jekyll setup, butno
docs/directory exists and no Pages build is wired up. EnablingPages via
gh apiwithout a working site would land visitors on ahalf-built 200 response. The repo-level metadata now advertises
https://sachncs.github.io/context/as the homepage so this isready to ship in the next sweep once the site content is built.