Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
f78573f
Allow literal labelled phrases in eval templates
mohanenm Nov 25, 2026
cd259a6
Add mypy and fix the type errors it found
mohanenm Nov 25, 2026
946c419
Call the old held-out set validation, keep heldout as an alias
mohanenm Nov 25, 2026
ef2f9d6
Move working notes out of the repository
mohanenm Nov 25, 2026
32a194b
Add an architecture overview and drop internal references from the se…
mohanenm Nov 25, 2026
00b210b
Add contributing guide, agent instructions and security policy
mohanenm Nov 25, 2026
b1036aa
Rewrite eval docs to describe how each set was made
mohanenm Nov 25, 2026
a8260a9
Plainer README, site and changelog
mohanenm Nov 25, 2026
8b05aca
Check in CI that local-only files are never tracked
mohanenm Nov 25, 2026
eb330ca
Drop internal references from comments and name regression tests by area
mohanenm Nov 25, 2026
4786d32
Fix lint in the hygiene check
mohanenm Nov 25, 2026
04d6b0e
Drop internal references from the corrections log and 3.10 lock
mohanenm Nov 25, 2026
bd33c6e
Check built distributions against an allowlist
mohanenm Nov 25, 2026
99612a0
Split CI into lint, test matrix, Tier 0 floor, build and audit jobs
mohanenm Nov 25, 2026
bbbb7a7
Add Dependabot for pip and actions
mohanenm Nov 25, 2026
7ef2f8a
Add CodeQL and dependency review
mohanenm Nov 25, 2026
63ed600
Add a weekly job against the newest dependencies
mohanenm Nov 25, 2026
f3f635f
Add a release workflow for trusted publishing, disabled for now
mohanenm Nov 25, 2026
aa6a850
Pin and restrict the Pages workflow
mohanenm Nov 25, 2026
33dcc02
Add a sealed evaluation set, scored only with eval --final-check
mohanenm Nov 25, 2026
7928cdd
Ignore mapping and audit files by their real extensions
mohanenm Nov 25, 2026
dfc1abe
Correct the security doc on model verification and network isolation
mohanenm Nov 25, 2026
570b2a7
Describe agent-written eval sets accurately and trim duplicated docs
mohanenm Nov 25, 2026
880b406
Mention the clipboard helper exception; plainer site wording
mohanenm Nov 25, 2026
8254339
Update the changelog
mohanenm Nov 25, 2026
138cabd
Report clean-transcript rate, leaks per transcript and severity
mohanenm Nov 25, 2026
1344347
Add a private evaluation workflow: review --draft-labels and a guide
mohanenm Nov 25, 2026
2319d3f
Pin the sealed set by tree hash, gate review on it, widen never-track…
mohanenm Nov 25, 2026
711d171
CI: test the installed wheel in the floor job, audit the extras, keep…
mohanenm Nov 25, 2026
5ef1e32
Pin the build backend, use an SPDX licence and keep tests out of the …
mohanenm Nov 25, 2026
076f066
Add 20 tuning transcripts weighted towards percentages, places and to…
mohanenm Nov 25, 2026
0fd60bb
Log the name replacements in the new tuning transcripts
mohanenm Nov 25, 2026
f9841eb
Catch rates said without a percent word: spoken figures near business…
mohanenm Nov 25, 2026
850f2c5
Find places by shape and cue: road numbers, capitalised names before …
mohanenm Nov 25, 2026
5881113
Add plain-language topic terms: legal, secrecy, workforce, closures, …
mohanenm Nov 25, 2026
6c63b57
Tier 1: redact topic sentences by meaning; verify the embedding model…
mohanenm Nov 25, 2026
aad34ba
Lead the README and site status with recall and clean-transcript rate
mohanenm Nov 25, 2026
06e47c3
Report how much of the text is redacted, in eval and in the run summary
mohanenm Nov 25, 2026
90d994d
Evaluate Tier 2 with the same NER ensemble that redact --tier 2 uses
mohanenm Nov 25, 2026
51e8254
Complete package metadata: URLs, classifiers, keywords; absolute READ…
mohanenm Nov 25, 2026
46ba2a6
Pack long word lists into split strings
mohanenm Nov 25, 2026
8d27fed
Remove not-implemented stub and dead import fallback
mohanenm Nov 25, 2026
a30af4b
Remove unused helpers
mohanenm Nov 25, 2026
a0296de
Make _covered src argument required
mohanenm Nov 25, 2026
6c15381
Drop unreachable ValueError handler in parse_ts
mohanenm Nov 25, 2026
184cc0e
Share caption block splitting between srt and vtt
mohanenm Nov 25, 2026
925eb8f
Fold repeated secret and decrypt steps in cli into helpers
mohanenm Nov 25, 2026
e07e343
Record dropped turn index inside compress drop helper
mohanenm Nov 25, 2026
bc46ee1
Mark tiktoken counts as exact and rename Counter to TokenCounter
mohanenm Nov 25, 2026
f1f6bb9
Clamp the readability count to the turn; round the summary; share one…
mohanenm Nov 25, 2026
0fcbd76
Bound number-word chains to keep figure regexes linear; skip everyday…
mohanenm Nov 25, 2026
becb57d
Fewer false places; catch lower-case road numbers and street pairs in…
mohanenm Nov 25, 2026
66d8b08
Tier 1 topic matching follows the topic settings and windows long sen…
mohanenm Nov 25, 2026
27714d5
Narrow topic phrases that caught everyday speech
mohanenm Nov 25, 2026
d746005
Decode and line-check clipboard input like file input
mohanenm Nov 25, 2026
e99a4e9
Changelog for this round
mohanenm Nov 25, 2026
b5cac8d
Merge duplicate changelog sections
mohanenm Nov 25, 2026
ca0a3c8
Merge branch 'round-2' into round-2-fixes
mohanenm Nov 25, 2026
41fad62
Merge branch 'round-2-cuts' into round-2-fixes
mohanenm Nov 25, 2026
efb45c8
Tier 2: check Tier 0's name guesses with the LLM, and report output t…
mohanenm Nov 25, 2026
a754e42
Check Tier 0 guesses before merging and once per word, so no other re…
mohanenm Nov 25, 2026
3dadfa3
End sentences at line breaks for topic and model checks
mohanenm Nov 25, 2026
0ffd039
Draft labels never span a line break; half-open markup is an error; w…
mohanenm Nov 25, 2026
2e6498f
Redact pricing and renewal sentences by default; old behaviour is top…
mohanenm Nov 25, 2026
5bfceed
Protect personal data by default and flag business context
mohanenm Nov 26, 2026
521154e
Count a flag found in several views once
mohanenm Nov 26, 2026
c62614c
Extend addresses over unit, city, state and postcode
mohanenm Nov 26, 2026
68ffb6b
Catch names that are ordinary words: capitalised mid-sentence, repeat…
mohanenm Nov 26, 2026
7bcf8fc
Catch spelled identifiers, last digits without 'in', phone extensions…
mohanenm Nov 26, 2026
212e2f0
Add 20 tuning transcripts weighted towards hard-to-catch personal data
mohanenm Nov 26, 2026
c2b5a0c
Catch spoken IPs, multi-word secrets, read-back codes, spoken emails,…
mohanenm Nov 26, 2026
4b0cdf8
Treat ordinary-word given names as names next to person words
mohanenm Nov 26, 2026
a69f397
Tighten the new PII rules after review: weak name guesses, secrets, a…
mohanenm Nov 26, 2026
bed67c8
Catch indirect identifiers at Tier 0: people redacted, organisations …
mohanenm Nov 26, 2026
bcc97d3
Redact personal-topic sentences only when they are about someone
mohanenm Nov 26, 2026
25e81eb
Report 95% intervals for PII recall and the PII-clean rate
mohanenm Nov 26, 2026
7b0a7a1
Narrow Tier 2 to indirect identifiers the rules missed
mohanenm Nov 26, 2026
f043eb4
Update docs for personal data first and the narrowed Tier 2
mohanenm Nov 26, 2026
0911297
Report the sealed-set result: Tier 0 misses its PII targets on places
mohanenm Nov 26, 2026
8fd4ef1
Add 20 tuning transcripts dense with place names
mohanenm Nov 26, 2026
f0143bf
Catch more place names: complete partial names, uncased places
mohanenm Nov 26, 2026
a432443
Document place handling, the personal-topic anchor and the spent seal…
mohanenm Nov 26, 2026
8276358
Fix import on Python 3.11: use a factory for read-only mapping defaults
mohanenm Nov 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Weekly dependency updates. Minor and patch bumps are grouped: runtime dependencies in one
# pull request, development tools in another. Major bumps arrive one per pull request.
# After a pip bump, refresh requirements/*.lock (see the header of each lock file).
version: 2
updates:
- package-ecosystem: pip
directory: /
schedule:
interval: weekly
groups:
dev:
patterns: ["pytest", "hypothesis", "ruff", "pip-audit", "mypy", "types-*", "build"]
update-types: [minor, patch]
runtime:
patterns: ["*"]
update-types: [minor, patch]

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
actions:
patterns: ["*"]
update-types: [minor, patch]
117 changes: 98 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,121 @@ name: ci

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

# Actions are pinned by commit SHA; the tag is noted for humans and Dependabot.
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- run: python -m pip install -e '.[dev]' -c requirements/dev.lock
- run: ruff check .
- run: ruff format --check .
- name: No local-only files tracked; sealed set untouched
run: python scripts/check_hygiene.py

test:
name: test (Python ${{ matrix.python }})
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.10"
lock: requirements/dev-py310.lock
audit: false
- python-version: "3.12"
lock: requirements/dev.lock
audit: true
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
# Actions pinned by commit SHA (supply chain). Tags noted for humans.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}
- name: Install
env:
LOCK: ${{ matrix.python == '3.10' && 'requirements/dev-py310.lock' || 'requirements/dev.lock' }}
run: python -m pip install -e '.[dev]' -c "$LOCK"
- run: mypy
- run: pytest -q

# The floor: the built wheel with no extras and no dev tools, as a user would install it.
tier0:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.10"
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: dist
path: dist
- name: Install the wheel alone
run: |
python -m venv /tmp/floor
/tmp/floor/bin/pip install dist/*.whl
- name: No optional packages present
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[dev]' -c ${{ matrix.lock }}
- name: Lint
/tmp/floor/bin/python -c "import importlib.util as u, sys; sys.exit(any(u.find_spec(m) for m in ('onnxruntime', 'numpy', 'tokenizers', 'llama_cpp', 'torch', 'tiktoken')))"
- name: doctor and a Tier 0 redaction
run: |
/tmp/floor/bin/offrecord doctor
/tmp/floor/bin/offrecord redact samples/sales-call.txt --no-mapping > /tmp/out.txt
test -s /tmp/out.txt
- name: Network-guard tests against the installed wheel
run: |
/tmp/floor/bin/pip install pytest -c requirements/dev-py310.lock
cd tests && /tmp/floor/bin/python -m pytest -q -p no:cacheprovider test_netguard.py test_no_network.py

build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- run: python -m pip install build -c requirements/dev.lock
- run: python -m build
- name: Check what the sdist and wheel contain
run: python scripts/check_hygiene.py --dist dist
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: dist
path: dist/
retention-days: 7

audit:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- run: python -m pip install pip-audit -c requirements/dev.lock
- name: Known vulnerabilities in pinned dependencies, including the optional extras
run: |
ruff check .
ruff format --check .
- name: Test
run: pytest -q
- name: Dependency audit
if: ${{ matrix.audit }}
run: pip-audit --skip-editable -r ${{ matrix.lock }}
python -c "import tomllib; e = tomllib.load(open('pyproject.toml', 'rb'))['project']['optional-dependencies']; print('\n'.join(e['ner'] + e['llm']))" > /tmp/extras.txt
pip-audit --strict --no-deps --disable-pip -r requirements/dev.lock -r /tmp/extras.txt
32 changes: 32 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: codeql

on:
push:
branches: [main]
pull_request:
schedule:
- cron: "17 4 * * 1"

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
analyze:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5
with:
languages: python
build-mode: none
- uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: dependency-review

on:
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
review:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1
with:
fail-on-severity: moderate
20 changes: 12 additions & 8 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: pages

# Publishes site/ (a static, self-contained page) to GitHub Pages.
# Needs Settings -> Pages -> Source: "GitHub Actions".
# Upload and deploy are separate jobs (GitHub's recommended layout): the deploy job starts only
# after the artifact upload has fully completed.
# Upload and deploy are separate jobs: the deploy job starts only after the artifact upload has
# fully completed.
on:
push:
branches: [main]
Expand All @@ -12,8 +12,6 @@ on:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
Expand All @@ -22,19 +20,25 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site

deploy:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v5
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
89 changes: 89 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Publishes a tagged release to PyPI with trusted publishing (OIDC, no API token) and
# attestations, then creates a GitHub release from the changelog.
#
# Disabled until the repository variable RELEASE_ENABLED is set to "true" and a trusted
# publisher for this workflow and the "pypi" environment is configured on PyPI. The "pypi"
# environment should require a reviewer, and a tag ruleset should restrict who can push v* tags.
name: release

on:
push:
tags: ["v*"]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
build:
if: vars.RELEASE_ENABLED == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- name: Tag matches the package version
env:
TAG: ${{ github.ref_name }}
run: |
version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
test "v$version" = "$TAG"
- name: Test the tagged commit
run: |
python -m pip install -e '.[dev]' -c requirements/dev.lock
pytest -q
- run: python -m build
- run: python scripts/check_hygiene.py --dist dist
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: dist
path: dist/

pypi:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: pypi
url: https://pypi.org/p/offrecord
permissions:
id-token: write # trusted publishing and attestations
steps:
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3

github-release:
needs: pypi
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: dist
path: dist/
- name: Release notes from CHANGELOG.md
env:
TAG: ${{ github.ref_name }}
run: |
awk -v v="${TAG#v}" '$0 ~ "^## \\[" v "\\]" {on=1; next} /^## \[/ {on=0} on' CHANGELOG.md > notes.md
test -s notes.md
- name: Create the release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
run: gh release create "$TAG" dist/* --title "$TAG" --notes-file notes.md --verify-tag
Loading
Loading