-
Notifications
You must be signed in to change notification settings - Fork 119
week_8: Module C (The Librarian) — live B→C integration, docs, and the regression gate #1011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PRAteek-singHWY
wants to merge
15
commits into
OWASP:main
Choose a base branch
from
PRAteek-singHWY:gsocmodule_C_week_8
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
63f5cc5
week_8: Module C (The Librarian) — reconcile the queue mirror with Mo…
PRAteek-singHWY fb48443
week_8: Module C (The Librarian) — envelope sink, and the rule that g…
PRAteek-singHWY b5b2e21
week_8: Module C (The Librarian) — the consumed_at write-back
PRAteek-singHWY 9e39c41
week_8: Module C (The Librarian) — wire the C.4 safety seam into deci…
PRAteek-singHWY fa27e08
week_8: Module C (The Librarian) — component factory for the orchestr…
PRAteek-singHWY d916c65
week_8: Module C (The Librarian) — live queue runner + CLI
PRAteek-singHWY 344fd22
week_8: fail the eval harness when the C.0 boundary rejects everything
PRAteek-singHWY bf53f8c
week_8: address CodeRabbit on #1011 — naive consumed_at, honest run s…
PRAteek-singHWY ae1ce26
week_8b: Module C (The Librarian) — package docs, final metrics, and …
PRAteek-singHWY 32a5f95
week_8b: fix the regression gate's dependency install
PRAteek-singHWY 63faf0b
week_8b: address CodeRabbit on #1012 — checkout credentials, diagram …
PRAteek-singHWY 058ace6
week_8: Module C (The Librarian) — decision_queue, the C -> D handoff
PRAteek-singHWY 29cc50b
week_8: address CodeRabbit on #1011 — project the highest link confid…
PRAteek-singHWY 0ff8729
week_8: address CodeRabbit on #1011 — poison rows, blank run id, cros…
PRAteek-singHWY 69c44c3
week_8: address the remaining CodeRabbit findings on #1011
PRAteek-singHWY File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| name: Librarian Regression Gate | ||
| # Module C's accuracy gate. The unit suite proves the code runs; this proves the | ||
| # pipeline still *decides* correctly over the golden set. | ||
| # | ||
| # Deliberately hermetic: no DB, no API key, no model download. The semantic | ||
| # reports (C.1 recall, C.2 top-1, the C.3 ECE gate, C.4 decision accuracy) need | ||
| # live CRE vectors and are measured locally — seeding a candidate pool from | ||
| # golden text offline is the leakage the hub firewall exists to strip, so a CI | ||
| # job that "measured" them would be measuring nothing. | ||
| # | ||
| # What this gate does catch is the failure that actually bit us: a Module B | ||
| # schema change silently rejecting every row at the C.0 boundary, which used to | ||
| # leave the explicit gate with nothing to count and still exit 0. | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'application/utils/librarian/**' | ||
| - 'application/tests/librarian/**' | ||
| - 'scripts/evaluate_librarian.py' | ||
| - '.github/workflows/librarian_regression.yml' | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'application/utils/librarian/**' | ||
| - 'application/tests/librarian/**' | ||
| - 'scripts/evaluate_librarian.py' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| regression: | ||
| name: Librarian Regression Gate | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| # This job only reads the tree; leaving the token in .git/config would | ||
| # expose it to anything the test run executes. | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12.3' | ||
|
|
||
| - name: Install python dependencies | ||
| # Installed straight into the runner's interpreter rather than through | ||
| # `make install-python`: that target builds a venv (needing an apt | ||
| # `virtualenv` the other workflows install first) and then runs | ||
| # `playwright install`, neither of which a hermetic librarian run uses. | ||
| # The steps below call `python` directly, so a venv the job never | ||
| # activates would leave them running against a bare interpreter. | ||
| run: | | ||
| pip install --upgrade pip setuptools | ||
| pip install -r requirements-dev.txt | ||
|
|
||
| - name: Librarian unit suite | ||
| run: python -m unittest discover -s application/tests/librarian -p '*_test.py' -t . | ||
|
|
||
| - name: Golden-set decision gate | ||
| # Non-zero on: a failed explicit-slice gate (C.0.5 must be 100%), or a | ||
| # C.0 boundary that rejected the whole dataset. | ||
| run: | | ||
| python scripts/evaluate_librarian.py \ | ||
| --dataset application/tests/librarian/fixtures/golden_dataset.json | ||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.