Repository navigation
Wave 2: trial-vs-repeat stale k docstring fix - #1
Merged
Merged
Conversation
The docstring cited a specific projection factor k (~164.07) that this tool never uses (it keeps raw panel-measured household counts) — a stale-by-copy number. Removed the literal; the substance stands (panel 0.2.0 projects by a locked k, this function does not). The value lives in the panel package. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Locks the client-mode compute_trial_repeat against the tested engine's repeat_summary on the real seeded demo panel (n_mature 4456, repeaters 2188, rate 0.491) — pins both the demo number and client-mode fidelity together. Plus a right-censoring boundary fixture (a repeat one day outside the window doesn't count; recent triers are excluded, not counted as non-repeaters). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Panel-transaction intake computing trial + maturity-cutoff repeat rate via lailara_engagement, replicating the tested engine's repeat_summary exactly (right-censoring: recent triers are excluded from the rate, not counted as non-repeaters; cutoff date stated on the deliverable). Household-panel grain, not POS. basis.repeat_window_weeks required. Engine-fidelity golden: compute_trial_repeat reproduces repeat_summary on the real demo panel (n_mature 4456, repeaters 2188, rate 0.491). client_mode.py, INPUT-SPEC.md, engagement.demo.yml, §6 tests. (Fixed test path handling — my new tests use package imports + cwd rather than shadowing the app package.) Full suite 59 passed; drift clean; no allowlist. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Prompt 6 step 0.e. core.hooksPath (the local pre-push guard) is inert on a fresh clone, so a force-added active engagement.yml could otherwise reach a deploy. Add an 'Engagement guard' step (python3 scripts/engagement_guard.py — python3 is preinstalled on ubuntu-latest) right after checkout in the deploy path, so the guard runs server-side regardless of local git config. No-op for demo/clean checkouts (engagement.yml is gitignored). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The golden imported client_mode (→ lailara_engagement), so it importorskip'd without the lib and couldn't gate in CI. A golden pins DEMO output and must not depend on client-mode scaffolding — so a CI PAT expiry can never turn the demo invariant red. - test_demo_golden.py now locks the demo repeat summary straight from the engine (app.trial_repeat.repeat_summary on the seeded panel): n_triers/mature/immature, repeaters, rate, maturity cutoff. No lailara_engagement import. - Moved the engine-fidelity lock (compute_trial_repeat reproduces the engine) and the direct right-censoring boundary fixture into tests/test_client_mode.py, which already importorskips the lib — the correct home for lib-dependent tests. Verified: golden PASSES in a clean venv with the vendored packages + .[dev] but NO lailara_engagement (credential-free); client-mode suite 8 passed with the lib. Demo numbers unchanged (4456 mature / 2188 repeaters / 0.491). Workflow wiring follows once LAILARA_ENGAGEMENT_TOKEN exists. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds .github/workflows/client-mode.yml: installs the repo's deps + lailara_engagement from the private repo pinned to v0.2.1 (LAILARA_ENGAGEMENT_TOKEN secret), then runs the client-mode suite that previously importorskip-skipped the lib. The demo golden gate is untouched and credential-free, so a PAT expiry degrades client-mode coverage only, never the demo invariant. Install verified green in a clean venv locally (lib from the local path, identical code to the tagged git URL). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds an input-tracking regression for the deliverable's repeat window label
('within N weeks', 'N-week window') and maturity cutoff date, both derived
from basis.repeat_window_weeks. The deliverable test asserted only the demo's
own 'within 12 weeks' / '2025-11-08' — a positive-only check a hardcoded 12
would also pass, the gap that let trade-spend quote 26 weeks as "trailing 52
weeks".
Both halves: feed a distinctive window (8) and assert label + cutoff track it
(cutoff = as_of − 8w = 2025-12-06), AND assert the demo default is absent.
Test-only; demo goldens unchanged; canonical-drift clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e guard) Explicit ::error:: before the lib install when the secret is empty or the literal '-' (the --body - failure mode), instead of git's misleading 'password authentication is not supported.' Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…bel + Fix 2 duplicate-mapping WARN) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Wave 2 — trial-vs-repeat
Fix: the
buyer_flowdocstring cited a specific projection factor k (~164.07) that this tool never uses — it keeps raw panel-measured household counts. A stale-by-copy number. Removed the literal; the substance stands (panel 0.2.0 projects by a locked k; this function does not). The value lives in the panel package.Full suite 51 passed; drift clean. Not merged, not on main, not deployed.