Commit graph

183 commits

Author SHA1 Message Date
c48e2102d0 fix(s52): scrub every URL-bearing exception path in WebhookNotifier 2026-07-17 03:15:57 +02:00
8c252c1064 fix(s52): reject scheme-less webhook URL fail-fast in NotifierConfig 2026-07-17 03:14:36 +02:00
b84f4d46bb feat(s52): export Notifier public contract + sync extending.md B11 2026-07-16 19:53:57 +02:00
1267f6c3eb feat(s52): fail-fast NotifierConfig + build_notifier factory (egress gate threaded) 2026-07-16 19:51:57 +02:00
fde44ceeb6 test(s52): AST guard — socket calls confined to the _urllib_post seam 2026-07-16 19:50:21 +02:00
c782c3402c feat(s52): webhook errors never leak the secret-bearing URL 2026-07-16 19:49:24 +02:00
61c4cb2d26 feat(s52): webhook notifier with fail-closed opt-in gate + injectable transport 2026-07-16 19:48:02 +02:00
f206dfbf65 feat(s52): MAF-free nested payload builder (verdict_to_dict oracle) + file notifier 2026-07-16 19:46:27 +02:00
d5b583349a feat(s52): Notifier protocol + console notifier + MAF-free registration 2026-07-16 19:45:17 +02:00
4ecd571961 docs(security): plan llm-ingestion-guard inclusion at ingest/inbox persist-gates
Map untrusted-ingest surface (ingest.materialize http/I6, verdict-inbox
load, promote_verdict, future received-bundle) vs first-party paths;
verdict = planned, wire scan/sanitize before M3 as S2.4/S2.5 extension.
Plan only — guard not wired. shared/ hardening owned by commons session.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
2026-07-16 07:43:30 +02:00
7e86896bc8 fix(s51): close 2 review MINORs — non-UTF-8 skip + affected_codes parity
Both live in the tolerant inbox-read path and both contradicted the module's
own "skipped, never raised" / loader-parity docstrings (S5.1 review: ALLOW,
2 MINOR, non-gating):

- UnicodeDecodeError (a *.json hand-saved in Latin-1 with Norwegian æ/ø/å is
  invalid UTF-8) now SKIPPED in hitl._load_json_dict AND
  verdicts.load_verdicts_from_dir — was: crashed pending/route with a raw
  traceback (a ValueError subclass, caught by neither OSError nor
  JSONDecodeError). Fix symmetric across both readers.
- hitl._inbox_verdict_ids now skips a non-iterable affected_codes exactly as
  load_verdicts_from_dir does (frozenset() raises TypeError) — was: marked the
  proposal judged on key-presence alone → a silent false-negative in the
  operator pending queue. hitl-only: verdicts is the correct reference.

TDD: 3 RED-then-green (both UnicodeDecodeError twins + the parity gap) + 1
ground-truth pin locking the loader side so the parity cannot rot.

Gate: pytest → 389 passed, 4 skipped (was 385); ruff check + format clean; mypy clean.
2026-07-15 20:59:01 +02:00
5807ac428c style(s51): ruff format hitl module + tests
Gate: ruff format --check . clean.
2026-07-15 19:43:41 +02:00
eaca95a325 feat(s51): MAF-free transitive import-graph probe
Gate: pytest tests/test_hitl_loadbearing.py tests/test_okf.py → 24 passed.
2026-07-15 19:41:42 +02:00
c4c55fd417 feat(s51): hitl CLI — python -m portfolio_optimiser.hitl pending|route
Gate: pytest tests/test_hitl.py -k cli → 4 passed.
2026-07-15 19:39:49 +02:00
62d6b40eae feat(s51): route pending proposals to experts by code-prefix
Gate: pytest tests/test_hitl.py tests/test_hitl_loadbearing.py -k route → 5 passed.
2026-07-15 19:38:00 +02:00
e9179271e6 feat(s51): fail-fast self-contained routing config loader
Gate: pytest tests/test_hitl.py -k routing_config → 6 passed.
2026-07-15 19:35:31 +02:00
b50e3fdff2 feat(s51): pending registry — outbox↔inbox id-join (MAF-clean)
Gate: pytest tests/test_hitl.py tests/test_hitl_loadbearing.py tests/test_okf.py → 26 passed.
2026-07-15 19:33:59 +02:00
ce5b1151c8 fix(s42): close review WARN — hermetic dry-run env + scoped azure hint
Post-hoc /trekreview of S4.2 surfaced two confirmed findings; both closed via TDD.

S42-001 (MAJOR): the new --live-dry-run CLI tests read PORTFOLIO_MODEL_MAP /
PORTFOLIO_FOUNDRY_PROJECT_ENDPOINT via resolve_model/AzureFoundryBackend but did
not isolate them, so both arms inverted their rc in a Foundry-configured env.
Add an autouse fixture that delenvs both, mirroring test_backends/test_preflight.

S42-002 (MINOR): the --live-dry-run except ValueError attached the azure-preflight
remediation to every offline-path ValueError (unknown project_id, empty docs_dir,
bundle mismatch). Scope the hint to args.profile == "azure"; structured refusal +
rc 1 preserved for all. New test proves a LOCAL unknown-project refusal carries no
azure hint.

Gate: pytest 358 passed / 4 skipped, ruff check + format clean, mypy 24 files.
2026-07-15 18:30:30 +02:00
d7313593bc feat(s42): --live-dry-run CLI flag + dry-run summary 2026-07-15 18:08:28 +02:00
0e986fe6c4 feat(s42): live_dry_run cut in run_project + DryRunReport 2026-07-15 18:05:16 +02:00
ebae4639dd feat(s42): byte-deterministic write_run_config outbox writer 2026-07-15 12:39:42 +02:00
f3b21db105 fix(s41): close review WARN — OSError refusal + scheme/profile branch coverage
Post-hoc /trekreview (WARN, scope 0670b2a..b513e64) surfaced 2 findings, both closed:
- MAJOR MISSING_TEST: the non-https scheme guard (preflight.py:61) and non-azure
  profile refusal (:82-86) had zero test coverage — added
  test_non_https_endpoint_refused + test_non_azure_profile_refused so an inverted
  condition can't regress silently.
- MINOR MISSING_ERROR_HANDLING: an existing-but-unreadable PORTFOLIO_MODEL_MAP
  raised PermissionError (an OSError, not ValueError) past the except at :95 →
  widened to OSError (subsumes FileNotFoundError). test_unreadable_override_is_
  structured_refusal proves the traceback-free invariant (red pre-fix).

Suite 348->351/4, ruff+format+mypy clean.
2026-07-15 11:58:10 +02:00
b513e64577 style(s41): ruff format preflight test files 2026-07-15 11:25:26 +02:00
123f71f547 docs(s41): verified Foundry auth recipe + necessary-but-not-sufficient note 2026-07-15 11:24:18 +02:00
44d6902186 test(s41): load-bearing preflight suite (AST no-network/no-auto-login guard + refusal teeth) 2026-07-15 11:23:15 +02:00
871999a55b feat(s41): offline Azure/Foundry preflight CLI (env-contract + placeholder refusal) 2026-07-15 11:21:44 +02:00
82c85d5e7c fix(s41): pass required credential in AzureFoundryBackend.create_chat_client 2026-07-15 11:18:40 +02:00
eb552f854e feat(s41): PORTFOLIO_MODEL_MAP override + placeholder fail-fast in resolve_model 2026-07-15 11:17:06 +02:00
0670b2a6d8 test(s36): value-level guard for _ore_to_kr_str money formatter
Closes the one MAJOR from /trekreview of S3.6 (verdict WARN): the
user-facing NOK-string formatter had only an isinstance(...,str) check,
so a regression (wrong divmod, dropped padding, øre/kr transposition,
or non-breaking-space → ASCII) would ship a wrong money figure with the
suite green. Adds a load-bearing value-level test (thousands grouping,
sub-100-øre padding, negative-sign branch) pinning the actual Norwegian
\xa0-separated formatting; verified red under a divmod(...,1000) mutation
and reverted. Suite 333 passed / 4 skipped, ruff+mypy clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
2026-07-15 10:25:05 +02:00
76d9f793c6 feat(s36): costsim CLI + no-network + no-hardcoded-price guards
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
2026-07-15 10:05:29 +02:00
37625435c4 feat(s36): estimate table (kost-mot-verdi + placeholder rows + sourced quality guidance)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
2026-07-15 10:02:00 +02:00
eb889a7f0e feat(s36): deterministic integer-ore estimate scaling with model x effort
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
2026-07-15 09:59:55 +02:00
cfa93799a5 feat(s36): PricingContract + fail-fast loader + placeholder path + quality guidance
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
2026-07-15 09:57:48 +02:00
47147e5f7c feat(s36): MAF-free costsim skeleton + model-map reader + registration
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
2026-07-15 09:54:25 +02:00
620d5cfb83 refactor(fase2a): konsolider fire skriptede klienter til én kanonisk (S2.5) 2026-07-15 07:37:43 +02:00
7978bd5f49 test(fase2a): commit Step 2 optional bundle_dir/verdict_dir tests (S2.0, omitted from 9659045) 2026-07-15 07:29:19 +02:00
73c24fc69a feat(fase2a): MAF version-guard (test-tidsvakt, dist-metadata) + pin agent-framework-core<2 (S2.5) 2026-07-15 07:28:40 +02:00
0a227a103b feat(fase2a): herd load_verdicts_from_dir — vokabular-SKIP + caps (S2.5) 2026-07-15 07:26:22 +02:00
a706184bdd feat(fase2a): wire run_project(outbox_dir, run_id) → outbox-skriving, load-bearing (S2.1) 2026-07-15 07:22:41 +02:00
79c6e44f92 feat(fase2a): MAF-fri outbox.py — byte-deterministisk proposal/outcome-writer (S2.1) 2026-07-15 07:18:21 +02:00
9311813080 feat(fase2a): percent-mål mot baseline 0 reiser ValueError (S2.0) 2026-07-15 07:14:29 +02:00
8ec71c9814 feat(fase2a): thread bundle_dir/verdict_dir i run_portfolio — kryssprosjekt-læring load-bearing (S2.0) 2026-07-15 07:12:50 +02:00
9659045fee feat(fase2a): optional Project.bundle_dir + loader (backward-compat, S2.0) 2026-07-15 07:03:15 +02:00
3497e64bdc test(fase2a): repo-lokal mini-bundle-fixture for kryssprosjekt-læring (S2.0) 2026-07-15 07:01:06 +02:00
12e7f6aabc docs(plan): utrulling D-F–D-I — sesjonsplan (D-F–D-I i §2, S3.5/S3.6/S5.4, graf+T0), roadmap-revisjonsblokk, commons-amendment-utkast (Step-1-analyse: NEI → minimal amendment), toolkit-repo-brief
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
2026-07-15 05:29:41 +02:00
f133bd4a65 docs(plan): revisjonspakke D-F–D-I — intensjonsanalyse 2026-07-14 (innholdsmodell, felles OKF-modul/toolkit-repo, team-oppskrift, verdibevis + kostnadssimulering)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
2026-07-14 22:11:06 +02:00
e8cc86a84b docs(review): kryssmodell-review 2026-07 (14 funn, 11 detach-bevis) + revidert roadmap + sesjonsplan Fase 2-6 2026-07-10 06:28:11 +02:00
847ed90135 feat(fase1): export domain-model public API + green full suite (F1) 2026-07-07 08:17:10 +02:00
69ca508677 feat(fase1): assessment-method encoding — persisted dimension-scoped example + validator rule (F1) 2026-07-07 08:15:44 +02:00
16b6d80b82 feat(fase1): hard/soft goal-stop in run_portfolio on accumulated ledger (F1) 2026-07-07 08:11:43 +02:00