text stringlengths 185 73.3k | repo stringlengths 7 100 | path stringlengths 4 146 | language stringclasses 7
values | hash stringlengths 16 16 | score float64 7 8.5 | stars int64 0 237k |
|---|---|---|---|---|---|---|
"""Reading the pre-S6 source and this run's shipped documents (campaign S7).
Helpers only — assertions live in ``test_fr_history_recovery_provenance.py``
(is the recovery complete?) and ``test_fr_history_published_counts.py`` (do the
shipped documents quote what the tables hold?). Split out so neither test module
cros... | svenroth-ai/shipwright | integration-tests/_fr_history_docs.py | .py | f5ddc90f1bc5970c | 8.06 | 12 |
"""Run one named false-verdict probe in an isolated subprocess.
python _probe_runner.py --probe t1 --root <project> [--json <extra>]
The false-verdict checks live in two different import realms
(``shared/scripts/tools/verifiers`` and the compliance plugin), and importing
``group_i`` reorders ``sys.path`` and evic... | svenroth-ai/shipwright | integration-tests/requirements_corpus/_probe_runner.py | .py | 1288408ceecf4d17 | 8.06 | 12 |
"""Serialize one target invocation into a golden-file cell.
Split out of ``_collect_realm`` so each module stays inside the 300-line gate;
this half answers "what does a cell look like", the other half answers "how do
I reach the callable".
The cell records MORE than a value. If the baseline held only normalized valu... | svenroth-ai/shipwright | integration-tests/requirements_corpus/_serialize.py | .py | 566ca435c828b2ab | 8.06 | 12 |
"""Orchestrate the realm subprocesses and merge their results.
One process per import realm, not one per target: a handful of processes keeps
the harness well clear of the ``slow`` marker while still giving real isolation.
"""
from __future__ import annotations
import json
import subprocess
import sys
import tempfil... | svenroth-ai/shipwright | integration-tests/requirements_corpus/collect.py | .py | ae725b63f387fc46 | 8.06 | 12 |
"""Materialize a corpus fixture into a real project root.
The corpus is written to disk at test time rather than committed as an on-disk
tree. A committed ``integration-tests/fixtures/**/.shipwright/planning/*/spec.md``
tree would be walked by this repo's OWN requirements machinery -- the
traceability collector, the a... | svenroth-ai/shipwright | integration-tests/requirements_corpus/corpus.py | .py | 643365e5a7b04e93 | 8.06 | 12 |
"""The behaviours this corpus freezes as WRONG, on purpose — and the ones that
have since been fixed, with the step that fixed them.
Read this before "fixing" anything that looks broken in ``golden.json``.
A golden file cannot carry comments, so a future contributor could look at a
surprising cell, conclude it is a m... | svenroth-ai/shipwright | integration-tests/requirements_corpus/frozen_bugs.py | .py | 242482f038dc4f74 | 7.06 | 12 |
"""Test-side helper: run a false-verdict probe against a fixture.
Kept in the package so both false-verdict test modules share one invocation
path -- a second copy would be free to drift into disagreeing about what
"failed" means.
"""
from __future__ import annotations
import json
import subprocess
import sys
import... | svenroth-ai/shipwright | integration-tests/requirements_corpus/probe.py | .py | 5b0d006036290447 | 8.06 | 12 |
"""Integration: onboarding's evidence stamp, and a Group E remedy that runs.
iterate-2026-08-05-adopt-derived-evidence-rollout.
Drives the REAL CLIs as subprocesses, exactly as the skill prose invokes them.
Two chains, both of which a unit test cannot close:
1. **stamp → commit → verify.** ``--stamp-adopted`` writes... | svenroth-ai/shipwright | integration-tests/test_adopt_evidence_stamp_e2e.py | .py | 7014c06da5573d90 | 8.06 | 12 |
"""Structural guard: no agent's `model:` frontmatter is pinned by this feature.
The BRIEF this feature implements is explicit that a prior attempt hardcoded
`model: opus`/`model: sonnet` into agent files and was abandoned before
delivery — hardcoding removes a plugin consumer's choice in either direction.
This diff's ... | svenroth-ai/shipwright | integration-tests/test_agent_model_frontmatter_unchanged.py | .py | 91f9f7aeb31de004 | 8.06 | 12 |
"""Integration test: Build autopilot flow.
Simulates the full autopilot lifecycle:
1. Init config with sections
2. Complete sections one by one
3. Verify dashboard updates
4. Simulate context pressure → checkpoint
5. Resume detection after checkpoint
6. All sections complete → verify final state
"""
impor... | svenroth-ai/shipwright | integration-tests/test_autopilot_flow.py | .py | 531196bc0c4f68bd | 8.06 | 12 |
"""End-to-end integration for the shared behavior_snapshot.py gate.
`snapshot -> (edit) -> verify` against a real synthetic pytest project. Proves
the ONE shared tool (`shared/scripts/tools/behavior_snapshot.py`) serves BOTH
gates that the unify-simplify-reducibility iterate joined:
- the **simplify** path (OS1): a b... | svenroth-ai/shipwright | integration-tests/test_behavior_snapshot_gate.py | .py | 3dc973cacddbe32f | 8.06 | 12 |
"""Integration: bloat-gate Stop hook fan-out emits exactly one block.
`cross_component` integration coverage (category:"integration") for
iterate-2026-06-20-bloat-gate-stop-fanout-dedup. Claude Code fires every
enabled plugin's Stop hooks with no active-plugin filter, so the bloat gate —
registered in all 12 plugins —... | svenroth-ai/shipwright | integration-tests/test_bloat_gate_fanout.py | .py | b0b63aab143286c9 | 8.06 | 12 |
"""Integration test: Compliance Enforcement Flow.
Tests that compliance hooks correctly integrate with the build pipeline:
- RTM coverage hook blocks commits when coverage is below threshold
- Security scan hook blocks deploys when findings are unresolved
- Override logging works across the pipeline
- Hooks ar... | svenroth-ai/shipwright | integration-tests/test_compliance_enforcement.py | .py | 74f310575b9d90b3 | 8.06 | 12 |
"""Integration coverage (cross_component): compliance PreToolUse Bash gates
must fail OPEN and be invoked robustly.
This is the `category:"integration"` test the F11 `check_integration_coverage`
gate requires because the diff touches `hooks.json` + `hooks/*.py` (FRAMEWORK
hook machinery). It proves two pieces COMPOSE ... | svenroth-ai/shipwright | integration-tests/test_compliance_hook_failopen.py | .py | 196d6ace9692f305 | 8.06 | 12 |
"""Integration test: Core Trilogy Flow.
Simulates the complete script flow across all three plugins:
shipwright-project → shipwright-plan → shipwright-build
Tests that scripts communicate correctly via config files and that
all expected artifacts are generated.
"""
import json
import subprocess
import sys
from pat... | svenroth-ai/shipwright | integration-tests/test_core_trilogy_flow.py | .py | 6f851625c69ea90b | 8.06 | 12 |
"""Integration test: DevOps Flow.
Tests the flow across DevOps plugins:
shipwright-changelog (with real git)
shipwright-test (test runner)
shipwright-deploy (validation only, no real Jelastic calls)
"""
import json
import os
import subprocess
import sys
from pathlib import Path
REPO_ROOT = Path(__file__).reso... | svenroth-ai/shipwright | integration-tests/test_devops_flow.py | .py | 4bfe96ef020cf412 | 8.06 | 12 |
"""Parity: the shared event-log resolver agrees with the compliance copy.
``shared/scripts/lib/events_log.py::resolve_events_path`` and
``plugins/shipwright-compliance/.../data_collector.py::_resolve_events_path``
are intentionally separate implementations — the compliance plugin is a
standalone distributable that can... | svenroth-ai/shipwright | integration-tests/test_events_log_parity.py | .py | fc2ad369f83b3640 | 8.06 | 12 |
"""End-to-end: the F0 runner records a race that outlives the run.
iterate-2026-07-27-f0-race-triage. Every other test for this feature stubs something
- the suite result, the triage API, or `run_suite` itself. This one stubs nothing: it
builds a throwaway project containing a genuinely unreliable test unit (fails on ... | svenroth-ai/shipwright | integration-tests/test_f0_race_followup_e2e.py | .py | e48697ed807ebfbc | 8.06 | 12 |
"""Integration (F0.5 production-time E2E): FR-Fold-Map resolution end-to-end.
Drives the REAL producer CLI — `plugins/shipwright-compliance/.../collectors/test_links.py`
as a subprocess, exactly as `update_compliance` invokes it — rather than importing
`build_manifest` in-process. That process boundary is the point: i... | svenroth-ai/shipwright | integration-tests/test_fold_map_e2e.py | .py | b7e7d80d26a42ff4 | 8.06 | 12 |
"""All three FR-criteria readers, invoked through their REAL entry points, on
inputs that distinguish adjacency behaviour (Stage-1 spec review, 2026-08-25).
``lib.spec_parser`` (S5), ``tools.verifiers._layer_coverage_ac`` (the
cross-layer fold gate) and
``plugins/shipwright-compliance/scripts/audit/group_i_criteria`` ... | svenroth-ai/shipwright | integration-tests/test_fr_criteria_three_way_convergence.py | .py | 056824785819c468 | 8.06 | 12 |
"""Parity: the S7 query folds amendments exactly like the compliance collector.
``lib/_fr_history_events.apply_amendments`` and
``plugins/shipwright-compliance/.../collectors/change_history._apply_amendments``
are intentionally separate implementations — the compliance plugin is a
standalone distributable that cannot ... | svenroth-ai/shipwright | integration-tests/test_fr_history_amendment_parity.py | .py | 338b0b54a9a51479 | 8.06 | 12 |
"""The catalog's side of the S6/S7 bargain (campaign S7).
Three claims the requirements catalog makes about itself, each asserted against
the file rather than trusted:
1. It names a command a reader can run, and **that command runs**.
2. It no longer promises coverage the event log does not have.
3. It no longer carr... | svenroth-ai/shipwright | integration-tests/test_fr_history_catalog_contract.py | .py | 5c49a67eabef42c4 | 8.06 | 12 |
"""The anti-skip guard in the shallow-clone meta-test, exercised.
``test_an_unreachable_pre_s6_commit_fails_rather_than_skipping`` exists because
a ``pytest.skip`` inside ``pre_s6_sections`` would delete six checks on any
shallow CI clone and report green. Its guard converts that skip into a hard
failure.
Nothing pro... | svenroth-ai/shipwright | integration-tests/test_fr_history_skip_guard.py | .py | 61edfe24f565d5b7 | 7.06 | 12 |
"""Where a requirements table ENDS — and what may not be read as one.
Split out of ``test_fr_table_reader_contract.py``. That module asserts what the
reader extracts from a table it has already accepted; this one asserts which
tables it accepts at all. The seam is the composition defect external code
review found on t... | svenroth-ai/shipwright | integration-tests/test_fr_table_reader_boundaries.py | .py | 6fe9fa9a742fc6db | 8.06 | 12 |
"""``fr_table_reader`` behaves identically under all three import styles.
Raised in external plan review (GPT, medium): "a new module can work in tests
yet fail in release tooling or hooks" — enumerate the execution modes of the
five consumers rather than reasoning about them.
That is the ADR-045 failure class, and i... | svenroth-ai/shipwright | integration-tests/test_fr_table_reader_load_styles.py | .py | 8ea997768474b98b | 8.06 | 12 |
"""Phase α (variance-containment) helpers extracted for unit testability.
Both broker.py and graph_nexus_analysis.py call into these so tests can
exercise the exact production logic instead of replicating it inline.
Reference: docs/superpowers/plans/2026-05-18-bt136708-fix-implementation.md §11
"""
from __future__ im... | Th3-H4xx0r/IntelliStock | backend/_phase_alpha_helpers.py | .py | ad263651d46e8793 | 7.54 | 11 |
"""
Auth utilities: user storage in Postgres, password hashing, JWT.
Used by server.py (default admin) and api/main.py (auth endpoints + protection).
Every function keeps its leading ``conn`` parameter (R26): ~20 call sites and
half a dozen test doubles pass one. It is accepted and ignored -- the store
takes its own p... | Th3-H4xx0r/IntelliStock | backend/auth_utils.py | .py | ef489c7bcb51c30c | 7.54 | 11 |
"""Per-bar in-memory snapshot/restore primitive for backtest LLM-critical pauses.
Reuses strategy_cache_persistence._serialize_cache_for_blob for the
strategy_cache portion (handles unpicklable lambdas via __skipped_fields__).
portfolio_emulator and current_time are simple python values; deepcopy.
Module-level single... | Th3-H4xx0r/IntelliStock | backend/backtest_bar_snapshot.py | .py | 346104e45a79aa20 | 8.04 | 11 |
"""Pure authenticated contract for queue-time backtest execution snapshots.
This module performs no database, provider, credential, or strategy work. V1
is intentionally narrow and default-inert: only an explicit, positively
validated equity/Graph-Nexus public projection can be signed. Integrations
must execute the ... | Th3-H4xx0r/IntelliStock | backend/backtest_execution_snapshot.py | .py | 27c3ccfa9ed9ea98 | 7.04 | 11 |
"""Immutable preregistration boundary for promotable equity backtests."""
from __future__ import annotations
from collections.abc import Mapping
from dataclasses import dataclass
from datetime import date, datetime
from experiment_registry import (
ExperimentRegistry,
ExperimentSpec,
RegisteredExperiment... | Th3-H4xx0r/IntelliStock | backend/backtest_experiments.py | .py | c4dd6fadd0a59611 | 8.04 | 11 |
"""Monotonic-cursor cache for backtest price-history slicing.
Backtest time advances strictly forward, so the price-history slice
available to the strategy can be computed in O(new_bars) per call
rather than O(total_bars). The previous implementation rebuilt every
symbol's slice from scratch on every backtest bar — fo... | Th3-H4xx0r/IntelliStock | backend/backtest_price_history.py | .py | cc77628beb14e66d | 8.04 | 11 |
"""Monotonic-cursor cache for the backtest per-step price lookup.
``_get_prices_at_time`` (broker.py) previously re-scanned every symbol's full
bar history from ``bars[0]`` on EVERY backtest step to find the latest bar at
or before ``current_time`` — O(bars-so-far) per step, i.e. O(n²) over the run,
the dominant cost... | Th3-H4xx0r/IntelliStock | backend/backtest_prices_cursor.py | .py | 32ef8cc52ad6a26a | 8.04 | 11 |
"""Truthful backtest P&L + a de-duplicated end-of-run price series.
Two pieces of the backtest wrap-up were separately re-deriving "the final
price", and they disagreed (incident 586767: the equity curve reported
+$437.54 while the row's P&L reported -$2,318.58 for the SAME run):
1. The row P&L valued open position... | Th3-H4xx0r/IntelliStock | backend/backtest_summary.py | .py | 9ce3da544a9889d6 | 7.04 | 11 |
"""Bounded, index-scoped read helpers for the alpha audit APIs (Task 8).
Every query requires an exact instance + origin scope or a run scope; limits
clamp to 1-500; cursors are opaque compound-index positions produced by the
backend. Storage failure surfaces as an error — never an empty success.
"""
DEFAULT_LIMIT = ... | Th3-H4xx0r/IntelliStock | backend/benchmark_alpha/api_reads.py | .py | a2c69069c79b3b48 | 7.54 | 11 |
"""Inception truth, flow-aware TWR lenses, and activity ingestion (Task 9).
``InceptionState`` is durable: an ordinary restart's current equity can
never replace inception or the high-water mark. Time-weighted return links
sub-periods around external cash flows so a deposit is not performance.
Account activities inges... | Th3-H4xx0r/IntelliStock | backend/benchmark_alpha/benchmark.py | .py | 591af63ce324d956 | 7.54 | 11 |
"""Score-to-excess-return calibration (Task 10).
Probability calibration and conditional-return estimation are SEPARATE
artifacts (one isotonic curve cannot produce both — H08). Fitting uses
date-grouped cross-fitting for the uncertainty estimate, conservative
shrinkage toward zero/0.5, and requires at least 100 resol... | Th3-H4xx0r/IntelliStock | backend/benchmark_alpha/calibration.py | .py | 8b297c457b8807f3 | 7.54 | 11 |
"""Versioned execution-cost and implementation-shortfall model (Task 9A).
Every component is reported separately: directional half-spread, decision
latency drift, market impact, regulatory fees, missed-trade opportunity, and
fixed operating cost (reported both raw and amortized at current capital).
Missing NBBO inputs... | Th3-H4xx0r/IntelliStock | backend/benchmark_alpha/costs.py | .py | 1a08d25ea3d69479 | 7.54 | 11 |
"""Narrowly scoped, broker-reconciled reduce-only emergency executor (Task 6).
The ONLY order authority available during containment/KILL. It re-reads
broker positions immediately before acting, rejects buys and shorts, caps
every sell to currently-held quantity, and uses a deterministic risk-episode
client-order ID s... | Th3-H4xx0r/IntelliStock | backend/benchmark_alpha/emergency.py | .py | 00ecd89595f5ea05 | 7.54 | 11 |
"""Strict trading-calendar horizon outcome evaluator (Task 7A).
Entry is the registered tradable observation on the first session AFTER the
forecast's ``as_of``; exit is the same observation exactly N exchange
sessions later. The session list is exchange-authoritative — the weekday
fallback in ``live_calendar`` is pro... | Th3-H4xx0r/IntelliStock | backend/benchmark_alpha/outcomes.py | .py | 301a87f1ece2d08c | 7.54 | 11 |
"""Flow-adjusted drawdown state machine, mark health, and the legacy order
block (Task 6).
Drawdown is always the positive magnitude
``max(0, 1 - adjusted_equity / peak_adjusted_equity)``. External capital
flows (deposits/withdrawals) adjust the peak in dollar terms so a deposit
never creates a performance high and a ... | Th3-H4xx0r/IntelliStock | backend/benchmark_alpha/risk.py | .py | 3a3bdfc4ec156dd3 | 7.54 | 11 |
"""Quote-driven virtual shadow portfolio (Task 9A).
Maintains virtual cash, positions, fills, rejections, and equity against
recorded quotes and the registered cost model. Buys pay the ask, sells hit
the bid, every fill carries modeled costs. There is deliberately NO broker
submission surface of any kind — SHADOW_PORT... | Th3-H4xx0r/IntelliStock | backend/benchmark_alpha/shadow.py | .py | 05b66a178cb89e4c | 7.54 | 11 |
"""Typed contracts for the benchmark-alpha system (Task 5; Task 7 extends).
The central type-safety rule (adversarial finding E01): the execution
scheduler tick (``FULL``/``MONITOR``/``IDLE``) and the brokerage execution
mode (``OFF``/``OBSERVE``/``SHADOW_PORTFOLIO``/``PAPER``/``LIVE``) are
different typed fields. A s... | Th3-H4xx0r/IntelliStock | backend/benchmark_alpha/types.py | .py | 88817c166696a0e2 | 7.54 | 11 |
"""Pure helpers for the per-instance bot trade-decision log.
These build the record (and pick the "primary driver" strategy + reason) that
broker.py writes to the BotTradeDecisions table on each confirmed live buy/sell,
and that the mobile "Bot activity" view reads back per position. Kept free of
any DB / threading so... | Th3-H4xx0r/IntelliStock | backend/bot_decision_log.py | .py | 64a309da603f63fc | 7.54 | 11 |
"""WAL-based broker-position classifier.
Used at adapter ``__init__`` when ``clean_room_mode=True`` to partition the
positions reported by the brokerage account into:
- ``strategy_owned``: positions whose most recent FILLED BUYs in this
instance's LiveOrderWAL net to the current broker qty
- ``external``: positions... | Th3-H4xx0r/IntelliStock | backend/broker_adapters/_classifier.py | .py | 84852a1b2141a798 | 7.54 | 11 |
"""Idempotent client_order_id generator.
Alpaca constraint: <=48 chars, alphanumeric + hyphen/underscore only.
Format: {instance[:8]}-{md5(symbol|YYYY-MM-DD|side)[:16]}-{retry_n}
Deterministic: same (instance_id, symbol, date, side, retry_n) -> same id.
2026-04-22 (Fix A): cid is now keyed on DATE (YYYY-MM-DD) rathe... | Th3-H4xx0r/IntelliStock | backend/broker_adapters/_client_order_id.py | .py | d8994bd87053eec4 | 7.54 | 11 |
"""Preflight checks: Alpaca quota budget + order-pre-submit gates."""
from __future__ import annotations
from dataclasses import dataclass
from broker_adapters.errors import (
BrokerPreflightBlocked,
InsufficientBuyingPower,
PDTRestricted,
AssetNotTradable,
)
@dataclass
class QuotaBudget:
rpm_l... | Th3-H4xx0r/IntelliStock | backend/broker_adapters/_preflight.py | .py | 475611bd29c8b368 | 7.54 | 11 |
import requests
from bs4 import BeautifulSoup
from datetime import datetime
import pytz
from feedgen.feed import FeedGenerator
import logging
from pathlib import Path
# Set up logging
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
logger = logging.getLogger(__name__)
def ... | 0xSMW/rss-feeds | deprecated/ollama_blog.py | .py | c3132da86b5fd78a | 7.45 | 7 |
import os
import requests
from bs4 import BeautifulSoup
from datetime import datetime
import pytz
from feedgen.feed import FeedGenerator
import logging
from pathlib import Path
import re
# Set up logging
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
logger = logging.getLog... | 0xSMW/rss-feeds | deprecated/paulgraham_blog.py | .py | 59598abf53ce93b9 | 7.45 | 7 |
import requests
import xml.etree.ElementTree as ET
from bs4 import BeautifulSoup
from datetime import datetime
import pytz
from feedgen.feed import FeedGenerator
import logging
from pathlib import Path
# Set up logging
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
logger =... | 0xSMW/rss-feeds | deprecated/test_feed.py | .py | d4aad310e659111c | 7.95 | 7 |
import xml.etree.ElementTree as ET
from datetime import datetime, timezone
from email.utils import parsedate_to_datetime
from feedgen.feed import FeedGenerator
import logging
from pathlib import Path
from _common import build_feed, feed_self_url, save_feed
# Set up logging
logging.basicConfig(level=logging.INFO, form... | 0xSMW/rss-feeds | feed_generators/ai_research_meta_feed.py | .py | b50fe1fd1feb998a | 7.45 | 7 |
"""Generate an RSS feed for Anthropic's news blog (https://www.anthropic.com/news)."""
import argparse
import logging
import re
from pathlib import Path
from urllib.parse import urljoin
import pytz
import requests
import undetected_chromedriver as uc
from bs4 import BeautifulSoup
from dateutil import parser as datepa... | 0xSMW/rss-feeds | feed_generators/anthropic_news_blog.py | .py | 39068db84c274338 | 7.45 | 7 |
"""Generate an RSS feed for Anthropic's red team blog (https://red.anthropic.com).
red.anthropic.com now redirects to the Frontier Red Team page on
www.anthropic.com (/research/team/frontier-red-team), which lists publications
as standard listing cards linking to /research/... and /news/... articles.
"""
import argpa... | 0xSMW/rss-feeds | feed_generators/anthropic_red_blog.py | .py | 2f1603c0bfa09e0a | 7.45 | 7 |
"""Generate an RSS feed for Anthropic's research blog (https://www.anthropic.com/research)."""
import argparse
import logging
import re
from pathlib import Path
from urllib.parse import urljoin
import pytz
import requests
import undetected_chromedriver as uc
from bs4 import BeautifulSoup
from dateutil import parser a... | 0xSMW/rss-feeds | feed_generators/anthropic_research_blog.py | .py | b3942fc9e40de6df | 7.45 | 7 |
import argparse
import logging
import re
import xml.etree.ElementTree as ET
from datetime import datetime, timezone
from email.utils import parsedate_to_datetime
from pathlib import Path
from urllib.parse import parse_qs, urlparse
import requests
from bs4 import BeautifulSoup, Comment
from _common import (
build_... | 0xSMW/rss-feeds | feed_generators/hackernews_rss.py | .py | ce90251b395a572c | 7.45 | 7 |
import argparse
import re
import logging
from datetime import datetime, timedelta
from pathlib import Path
from urllib.parse import urljoin
import pytz
import requests
from bs4 import BeautifulSoup
from dateutil import parser as dateparser
from _common import (
build_feed,
clean_article_html,
extract_summ... | 0xSMW/rss-feeds | feed_generators/openai_alignment_blog.py | .py | 652cc7b743298431 | 7.45 | 7 |
import argparse
import logging
import os
from datetime import datetime
from pathlib import Path
import pytz
import requests
import undetected_chromedriver as uc
from bs4 import BeautifulSoup
from _common import (
DEFAULT_MAX_ITEMS,
build_feed,
clean_article_html,
extract_summary,
feed_self_url,
... | 0xSMW/rss-feeds | feed_generators/openai_research_blog.py | .py | cf585827f71e5f57 | 7.45 | 7 |
import os
import subprocess
import logging
from concurrent.futures import ThreadPoolExecutor, as_completed
# Set up logging
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
logger = logging.getLogger(__name__)
def _run_script(script_path: str) -> subprocess.CompletedProcess[... | 0xSMW/rss-feeds | feed_generators/run_all_feeds.py | .py | 005c8fa63ea3ac09 | 7.45 | 7 |
import argparse
import requests
import time
import undetected_chromedriver as uc
import re
from bs4 import BeautifulSoup
from datetime import datetime
import pytz
import logging
from pathlib import Path
from urllib.parse import urljoin
from _common import (
build_feed,
clean_article_html,
extract_summary,
... | 0xSMW/rss-feeds | feed_generators/thinkingmachines_blog.py | .py | 3f949fddbd41fb6e | 7.45 | 7 |
import requests
from bs4 import BeautifulSoup
from datetime import datetime
from dateutil import parser as dateparser
from urllib.parse import urljoin
import pytz
from feedgen.feed import FeedGenerator
import logging
from pathlib import Path
import time
import re
import undetected_chromedriver as uc
import argparse
imp... | 0xSMW/rss-feeds | feed_generators/xai_news.py | .py | 1c6593ad11f7145d | 7.45 | 7 |
"""Require a recent pytest stamp before content is pushed to ``main``.
Git has already resolved the working tree and ref updates before this hook is
called. That makes the update records on stdin the sole authority for whether
this is a push to ``main``; do not infer it from HEAD or shell arguments.
"""
from __futur... | learn-ukrainian/learn-ukrainian.github.io | .githooks/check-pytest-stamp.py | .py | e226b14309b91c58 | 8 | 9 |
#!/usr/bin/env python3
"""PreToolUse guard — block `gh pr merge --admin` when a BLOCKING CI check is red (#M-0.5 / #1908).
Reads the Claude Code hook payload on stdin (JSON with `tool_input.command`) and exits
2 (block) when the command is a `gh pr merge ... --admin` whose target PR has any
*blocking* (required) check... | learn-ukrainian/learn-ukrainian.github.io | agents_extensions/shared/hooks/guard-admin-merge.py | .py | b0ef46fabbdcbf71 | 7.5 | 9 |
#!/usr/bin/env python3
"""PreToolUse guard — auto-heals core.bare before git operations (#2842).
Reads the Claude Code hook payload on stdin (JSON with `tool_name` +
`tool_input.command`). If the command invokes `git`, it checks core.bare
and resets it to false if it has drifted to true. This prevents mid-session
git ... | learn-ukrainian/learn-ukrainian.github.io | agents_extensions/shared/hooks/heal-core-bare.py | .py | 94188c25ccca04a3 | 7.5 | 9 |
"""Provider-neutral, fail-closed proof boundary for GUI-native lease holders.
The session-stream store deliberately does not know how any desktop application
stores task state. A provider adapter reads that state, reduces it to this
privacy-safe envelope, and returns a verified proof only after validating its
own str... | learn-ukrainian/learn-ukrainian.github.io | agents_extensions/shared/session_streams/app_lifecycle.py | .py | 8cd9ddec15ca4aae | 7.5 | 9 |
"""Non-destructive legacy-handoff mirroring for dual-write migration."""
from __future__ import annotations
import hashlib
from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
from .inventory import epic_handoff_map, load_stream_epic_inventory
from .model import Entry, EntryRef, E... | learn-ukrainian/learn-ukrainian.github.io | agents_extensions/shared/session_streams/dual_write.py | .py | 025932035ab506a0 | 7.5 | 9 |
"""Cross-agent epic-stream handoff status + claim (issue #5530).
This is the interim safety path until Sol fleet-comms PR-I (common session
supervisor) owns full automation. It does not invent a second lease model —
it composes ``force_close_expired_session`` + ``open_session`` + typed pins.
"""
from __future__ impor... | learn-ukrainian/learn-ukrainian.github.io | agents_extensions/shared/session_streams/handoff.py | .py | 674bf7570dee603c | 7.5 | 9 |
"""Fleet-generic harness heartbeat and clean-exit hook surface."""
from __future__ import annotations
import os
from collections.abc import Mapping
from dataclasses import dataclass
from datetime import datetime
from .app_lifecycle import VerifiedAppLifecycleProof
from .model import HolderKind, Lease, LeaseHolder
fr... | learn-ukrainian/learn-ukrainian.github.io | agents_extensions/shared/session_streams/hooks.py | .py | 44da1c71569bea7c | 7.5 | 9 |
"""Manifest-derived session-stream inventory (Sol PR-H / #5512).
The hard-coded four-epic list must not remain authoritative. Inventory is
derived from ``scripts/config/issue_streams.yaml`` so every stream epic can
participate in dual-write / cutover tracking without code edits per epic.
"""
from __future__ import an... | learn-ukrainian/learn-ukrainian.github.io | agents_extensions/shared/session_streams/inventory.py | .py | ec2fac7f951fd0b3 | 7.5 | 9 |
"""Typed values shared by the session-stream storage and hook surfaces."""
from __future__ import annotations
import hashlib
import json
import re
from dataclasses import dataclass
from datetime import UTC, datetime
from enum import StrEnum
from typing import Any
STREAM_ID_RE = re.compile(r"^(?:epic:[1-9][0-9]*|shar... | learn-ukrainian/learn-ukrainian.github.io | agents_extensions/shared/session_streams/model.py | .py | 661004820a799209 | 7.5 | 9 |
"""DB-first legacy projection receipts + file drift detection (Sol PR-H / #5512).
After inventory registration, each epic can record a ``legacy_projection_receipts``
row describing what a dual-write compatibility projection would do. This module
does **not** rewrite handoff files, open leases, or advance migration mod... | learn-ukrainian/learn-ukrainian.github.io | agents_extensions/shared/session_streams/projection.py | .py | c48ac132e6345cd3 | 7.5 | 9 |
"""Built-in mock agent for testing and demos -- no API keys required."""
from __future__ import annotations
from aragora_debate.types import Agent, Critique, Message, Vote
class MockAgent(Agent):
"""A deterministic agent that returns canned responses.
Useful for testing, CI pipelines, and demos where real ... | synaptent/aragora | aragora-debate/src/aragora_debate/_mock.py | .py | 6321d2a6a8ef073f | 7.54 | 11 |
"""Lightweight convergence detection using difflib.
Tracks how similar agent proposals become across rounds. When proposals
converge beyond a configurable threshold, the debate may be ready to end --
or the trickster may need to intervene if convergence is hollow.
"""
from __future__ import annotations
import diffli... | synaptent/aragora | aragora-debate/src/aragora_debate/convergence.py | .py | faea0c081a51b186 | 7.54 | 11 |
"""Event/callback system for debate observation.
Provides a lightweight event emitter that supports both sync and async
callbacks, enabling real-time monitoring of debate progress without
coupling to any specific framework.
Example::
from aragora_debate.events import EventEmitter, EventType
emitter = EventE... | synaptent/aragora | aragora-debate/src/aragora_debate/events.py | .py | 889fa962318ed9cb | 7.54 | 11 |
"""Evidence Quality Scoring for Debate Rigor.
This module implements evidence quality metrics to detect "hollow consensus" -
when agents agree without substantive backing. It scores:
- Citation density (claims backed by sources)
- Specificity (concrete details vs vague statements)
- Evidence diversity (multiple eviden... | synaptent/aragora | aragora-debate/src/aragora_debate/evidence.py | .py | 3bde484541792d4d | 7.54 | 11 |
"""RFC 8785 (JSON Canonicalization Scheme) for Open Decision Receipts.
A dependency-free port of ``aragora.gauntlet.odr_export.jcs_canonicalize`` so
that ``aragora-verify`` can recompute an ODR receipt's content digest without
installing Aragora. Byte-for-byte identical output to the reference emitter is
the whole poi... | synaptent/aragora | aragora-verify/src/aragora_verify/jcs.py | .py | 5b4a448428c57b3a | 7.54 | 11 |
"""Shared fixtures: a valid ODR document and a spec-faithful Ed25519 signer."""
from __future__ import annotations
import base64
import copy
from typing import Any
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
from aragora_verify import compute_key_id, odr_content_digest
def vali... | synaptent/aragora | aragora-verify/tests/_fixtures.py | .py | 39c02cfd934f66ed | 8.04 | 11 |
"""`milyonus admin ...` — the operator-only surface for T0 writes (H1).
This surface is deliberately separate from the agent tools and every messaging
channel. Nothing the model sees can reach it. All commands require the operator's
private key (kept OFF this host); the host holds only the public key and can
verify, n... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/cli/admin_cmd.py | .py | c502e8fd9d940899 | 7.52 | 10 |
"""Milyonus CLI entry point.
This is the single binary users invoke as `milyonus` (alias `mil`). In F0 it
exposes the first live surface: version, banner, and `doctor`. Later phases add
`run`, `setup`, `memory`, `skills`, `gateway`, `cron`, `selfmod`, and `audit`
as subcommands on this same app.
"""
from __future__ i... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/cli/app.py | .py | 53f8382f1bab08d5 | 7.52 | 10 |
"""`milyonus eval ...` — run the task-level evaluation suite (observability)."""
from __future__ import annotations
import typer
from rich.console import Console
from rich.table import Table
from milyonus.brand import GLYPH, PALETTE
eval_app = typer.Typer(help="Task-level evaluation and observability.")
console = C... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/cli/eval_cmd.py | .py | 1da679f91aa00fb5 | 7.52 | 10 |
"""`milyonus mcp ...` — inspect configured MCP servers and their tools.
These commands answer "which external servers am I wired to, and what can they
do?" without starting a full session. They read the same `config.mcp_servers`
the agent uses, so what you see here is exactly what the model would be offered.
"""
from... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/cli/mcp_cmd.py | .py | 1e759ccd36df9f89 | 7.52 | 10 |
"""`milyonus proactive ...` — the scheduler runtime and automation suggestions."""
from __future__ import annotations
import typer
from rich.console import Console
from milyonus.brand import GLYPH, PALETTE
proactive_app = typer.Typer(help="Proactivity: run the scheduler, suggest automations.")
console = Console()
... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/cli/proactive_cmd.py | .py | b8d1b498e9174fb7 | 7.52 | 10 |
"""`milyonus selfmod ...` — inspect and roll back self-modifications."""
from __future__ import annotations
from pathlib import Path
import typer
from rich.console import Console
from milyonus.brand import GLYPH, PALETTE
from milyonus.selfmod.harness import SelfModHarness
selfmod_app = typer.Typer(help="Manage sel... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/cli/selfmod_cmd.py | .py | 6ed5b136a7d92587 | 7.52 | 10 |
"""`milyonus setup` — a short first-run wizard.
Writes ~/.milyonus/config.toml (provider + model choice) and reminds the user to
place their key in ~/.milyonus/.env. It never asks for the key on the command
line — secrets go in the .env file the user controls (PLAN §6 layer 4).
"""
from __future__ import annotations
... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/cli/setup.py | .py | 2d4a719858cb5557 | 7.52 | 10 |
"""`milyonus skills ...` — inspect and manage skills from the terminal."""
from __future__ import annotations
import typer
from rich.console import Console
from rich.table import Table
from milyonus.brand import GLYPH, PALETTE
from milyonus.skills.engine import SkillEngine
skills_app = typer.Typer(help="Inspect and... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/cli/skills_cmd.py | .py | b715d18ea138b8bf | 7.52 | 10 |
"""Load secrets from ~/.milyonus/.env into the process environment.
Keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, …) live in ~/.milyonus/.env with mode
0600, never in config.toml and never in the repo. This loader is called once at
startup. It does not override variables already set in the real environment, so
an explicit ... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/config/env.py | .py | 826ba3e5c59f1e9b | 7.52 | 10 |
"""Load and validate Milyonus config from disk.
The loader is strict (ADR-009): a malformed or unknown key raises ConfigError at
startup rather than silently degrading. A missing config file is fine — defaults
apply — because a first run should just work.
"""
from __future__ import annotations
import tomllib
from pa... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/config/loader.py | .py | 58fc16fa32e40ea4 | 7.52 | 10 |
"""Filesystem layout for Milyonus state under ~/.milyonus/.
All runtime state lives under a single data root so a deployment is one directory
to back up, move, or wipe. The root can be overridden with MILYONUS_HOME.
"""
from __future__ import annotations
import os
from pathlib import Path
def data_root() -> Path:
... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/config/paths.py | .py | f3df46da56741cbd | 7.52 | 10 |
"""Strict configuration schema for Milyonus.
ADR-009: config is validated by a strict schema. Unknown keys are a startup
error, never silently ignored — a typo must fail loud, not misconfigure a
security control. Security-relevant fields are grouped so they are easy to audit.
"""
from __future__ import annotations
f... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/config/schema.py | .py | cdb5ca7f82bd2282 | 7.52 | 10 |
"""Iteration/token budget shared across a task (and, later, its subagents).
The loop checks the budget before each model call and injects a pressure hint as
the window fills, so the agent wraps up instead of being cut off mid-thought.
"""
from __future__ import annotations
from dataclasses import dataclass
@datacl... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/core/budget.py | .py | 133b1af854647b51 | 7.52 | 10 |
"""Subagent delegation with a context contract (PLAN §8).
Hermes subagents start blank and rely on the parent to remember to pass context.
Milyonus requires a context contract: goal + non-empty context + success_criteria.
The framework assembles a briefing so the child is not flying blind, and the
child runs with a re... | ayazelrico/Milyonus-Agent-5.5 | src/milyonus/delegation/subagent.py | .py | 67de6a9da6193033 | 7.52 | 10 |
#!/usr/bin/env python3
"""Сравнение моделей на РАЗБОРЕ встречи, а не на скорости.
bench_models.py отвечает на вопрос «кто быстрее», и по нему 12.08 конфиг
переехал на MLX-сборку. Вопрос «кто точнее» остался открытым: качество
сравнивали на одной минутке. Здесь — та же функция разбора, что ходит в граф
(graph_updater.e... | charoiteai/Charoite_audio | scripts/bench_extract.py | .py | cb0c0da94855426d | 7.48 | 8 |
#!/usr/bin/env python3
"""Замер моделей на наших сценариях, а не на синтетике.
Синтетический tok/s ничего не решает: у суфлёра узкое место — не средняя
скорость, а задержка до первой подсказки на живой встрече и обработка
длинного контекста при разборе стенограммы. Поэтому меряем три вещи на
трёх разных нагрузках и пе... | charoiteai/Charoite_audio | scripts/bench_models.py | .py | 0e02610488ded4ff | 7.48 | 8 |
#!/usr/bin/env python3
"""Страж обезличивания публичного репозитория.
Раньше жил только в .git/hooks/pre-commit — а git хуки не переносит: на новой
машине, в свежем клоне и у любого контрибьютора защиты не было вовсе. Теперь
он в репозитории и подключён через .pre-commit-config.yaml.
Сам список маркеров приватен и ле... | charoiteai/Charoite_audio | scripts/check_private_markers.py | .py | 87169218a48db537 | 7.48 | 8 |
#!/usr/bin/env python3
"""Одна встреча — одна папка в архиве.
Тема встречи уточняется при повторных разборах, а папка называется по теме.
Пока архивация не умела переименовывать, каждое уточнение заводило вторую
папку на ту же встречу: «2026-07-15 09-00 — Бюджет MVP» и рядом
«2026-07-15 09-00 — Бюджет и ресурсы MVP». ... | charoiteai/Charoite_audio | scripts/dedup_archive.py | .py | efed7cca3b9e2a8a | 7.48 | 8 |
#!/usr/bin/env python3
"""Ночная дедупликация файлов графа.
Не путать с tier3: тот сшивает СМЫСЛОВЫЕ дубли ядер («Настройка доступа к API»
и «Получение токена» — одна тема разными словами) через bge-m3 и NLI. Здесь
задача проще и грубее: побайтовые копии одного файла в разных папках.
Откуда они берутся. Конвейер наме... | charoiteai/Charoite_audio | scripts/dedup_graph.py | .py | fe51dd3039bd20ff | 7.48 | 8 |
#!/usr/bin/env python3
"""Диагностика Charoite: одна команда вместо гадания «почему молчит».
Две половины. Первая — установка: конфиг и его ключи, папка графа, Ollama и
нужные модели (включая bge-m3 для семантики), STT-модели, диаризация,
зависимости. Вторая — рабочее состояние: отвечает ли модель на самом деле,
не за... | charoiteai/Charoite_audio | scripts/doctor.py | .py | f2280b7997f1c8e7 | 7.48 | 8 |
#!/usr/bin/env python3
"""Разовая правка формата поручений в уже накопленных минутках.
Новые встречи нормализуются на выходе демона, но у пользователя за месяцы
работы лежат десятки файлов, где поручения записаны прозой модели и потому
невидимы окну «Задачи». Замер по рабочему графу: 89 файлов минуток, задач
видно 4, ... | charoiteai/Charoite_audio | scripts/fix_action_items.py | .py | 6ec9b1b11489ceb2 | 7.48 | 8 |
#!/usr/bin/env python3
"""Модель диаризации одной командой — вместо «найдите и экспортируйте ONNX».
`README` обещает метки «Собеседник 1/2/…» по голосам, а демон включает трекер
только при наличии `models/diar/embedding.onnx`. Файл в поставку не входит:
STT-модель тянется сама при первом запуске, а эмбеддер до сих пор... | charoiteai/Charoite_audio | scripts/get_models.py | .py | a54fa8e4ee2a1fcf | 7.48 | 8 |
#!/usr/bin/env python3
"""Пересобрать `requirements-runtime.lock` — с версиями и хешами.
Встроенный в приложение python-контур ставился так: из `pyproject.toml`
брались диапазоны (`numpy>=1.26,<3`, `requests>=2.31`…) и подавались в
`pip install` без единого хеша. Значит в подписанный бандл, который
уезжает всем пользо... | charoiteai/Charoite_audio | scripts/lock_runtime_deps.py | .py | 79eb26e20f2ac8bf | 7.48 | 8 |
#!/usr/bin/env python3
"""Мини-бенч памяти: эталонные вопросы по архиву → проверка фактов в ответе.
Регрессионные тесты, но для КАЧЕСТВА ПАМЯТИ, а не кода: пороги NLI, длина
сниппетов, промпты синтеза крутятся часто — и каждый твик может незаметно
уронить ответы по архиву. Бенч гоняет реальный RAG-контур (поиск по гра... | charoiteai/Charoite_audio | scripts/memory_bench.py | .py | 7a5cff6a89163364 | 7.48 | 8 |
#!/usr/bin/env python3
"""Слияние графов вольта: граф-донор вливается в граф-приёмник.
Зачем. Раскол графа — реальная авария: 03.08 рабочая встреча уехала в
новый граф «Linux 1.8», который модель честно придумала по содержанию.
Конвейер с тех пор держится списка известных графов, но уже расколотое
надо уметь сшивать: ... | charoiteai/Charoite_audio | scripts/merge_graphs.py | .py | 9d12989fceeaaa09 | 7.48 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.