Skip to content

fix: audit M11 sweep — close all open issues - #32

Closed
sachncs wants to merge 108 commits into
masterfrom
fix/audit-m11-sweep
Closed

sachncs wants to merge 108 commits into
masterfrom
fix/audit-m11-sweep

Conversation

@sachncs

@sachncs sachncs commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Summary

Closes all 31 open issues in the sachncs/context repository in a single
atomic-commits-per-issue sweep.

Code / documentation fixes (29 issues, 29 commits)

# Commit scope
#1 Add Apache-2.0 LICENSE file
#2 Align pyproject.toml version with ceng.__version__ (0.4.0)
#3 Remove duplicate 0.3.0/0.4.0 sections from CHANGELOG; rename -SOTA
#4 Harden CI workflow — drop || true fallbacks, expand matrix to 3.10–3.12, add lint + typecheck
#6 Unify cache_dir defaults to .ceng/cache across the public API
#7 Raise ValueError in pick_target_message when no user-role message (was silently compressing system prompts)
#8 appworld() raises NotImplementedError so CI / wrappers fail loud
#9 Replace no-op slice expression original_text[:0] or 'compressed' with a literal
#10 Remove duplicated single-line docstring in build_curator_messages
#11 Use count_tokens() for summarised_tokens instead of len(summary.split())
#12 compressed_tokens=0 on short-circuit (distinguishes skip from no-reduction compression)
#13 Implement seed= parameter in run_eval (deterministic sample shuffle)
#14 Add retry / backoff (exponential + jitter) to LiteLLM and OpenAI backends, env-var tunable via CENG_RETRY / CENG_RETRY_BASE_MS
#15 Add EvalResult.backend_errors instead of masking infra failures as 0% accuracy
#16 Memoize active list in Playbook.trim_to_token_budget (was re-sorting per iteration)
#17 Expose configure_logging() at top level; add INFO logs to compress pipeline
#18 Add py.typed marker for PEP 561
#19 Curator supports ADD / UPDATE / MERGE / DELETE operations
#20 Add ruff + mypy config; auto-fix lint issues across src/ and tests/
#23 Add CI / License / Python / lint badges to README
#24 Fix stale github.com/sachingithub.com/sachncs/context URLs in pyproject.toml + CHANGELOG
#25 Add ## Contents TOC + ASCII pipeline diagram to README
#26 Mark BENCHMARKS.md headline numbers as smoke runs (do not cite)
#28 Backfill git tags v0.1.0v0.4.0 so pip install git+...@v0.4.0 works
#29 Add examples/ directory with 4 runnable scripts (quickstart / OKF bundle / compact / evolver smoke)
#30 Tighten README hero with one-line tagline + new ## Why ceng? section
#31 Add ARCHITECTURE.md (module map, pipeline diagrams, cache topology, extension points)

Already addressed in master before this branch (verified, no commit)

# Existing artefact
#5 CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, SUPPORT.md already at repo root
#27 .github/ISSUE_TEMPLATE/ (bug / feature_request / config.yml) and PULL_REQUEST_TEMPLATE.md already present

Repo-level metadata (applied via gh api, no commit)

# What was set
#21 Description = "Partition-Prompt-Aggregate context engineering for LLMs (ACE, OKF, PPA) — Apache-2.0" · homepage = https://sachncs.github.io/context/ · topics = llm, context-engineering, prompt-compression, agentic-context-engineering, okf, ppa, ace, litellm, vllm, openai

Issue #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 . then python -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__)" matches pip 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/ceng step was added in this branch but flagged as
follow-up work in the next audit sweep:

  • src/ceng/tokens.py:47 — union-attr on optional tokenizer
  • src/ceng/compact.py:227 — backend typed as object | None
  • src/ceng/playbook/evolver.py:317 — indexing into Iterable[Bullet]
  • src/ceng/compress/bundle.py:72/105/130/148path: str passed where
    Path | None expected (an OKF Concept annotation tightening)

Issues not fixed

#22 — GitHub Pages

GitHub Pages requires choosing a source (branch + folder, GitHub
Actions, or none). The repository ships an _config.yml and
index.md at the root that look like a partial Jekyll setup, but
no docs/ directory exists and no Pages build is wired up. Enabling
Pages via gh api without a working site would land visitors on a
half-built 200 response. The repo-level metadata now advertises
https://sachncs.github.io/context/ as the homepage so this is
ready to ship in the next sweep once the site content is built.

sachncs added 30 commits July 19, 2026 19:48
…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.
This was referenced Sep 11, 2026
@sachncs
sachncs force-pushed the fix/audit-m11-sweep branch from 4ee8656 to 4565948 Compare September 11, 2026 09:03
@sachncs sachncs closed this Sep 12, 2026
@sachncs

sachncs commented Sep 12, 2026

Copy link
Copy Markdown
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 sachin <sachncs@gmail.com>. This destructive operation was explicitly authorized by the repository owner. No code changes from this PR were lost — they are all reachable from the default branch tip.

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