-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (139 loc) · 7.41 KB
/
pyproject.toml
File metadata and controls
148 lines (139 loc) · 7.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "operations-center"
version = "0.1.0"
description = "Planning, routing, execution, policy, and evidence service for canonical task proposals"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"pydantic>=2.7",
"PyYAML>=6.0",
"httpx>=0.27",
"typer>=0.12",
"cxrp @ git+https://github.com/ProtocolWarden/CxRP.git",
"source-registry @ git+https://github.com/ProtocolWarden/SourceRegistry.git",
"rxp @ git+https://github.com/ProtocolWarden/RxP.git",
"executor-runtime @ git+https://github.com/ProtocolWarden/ExecutorRuntime.git",
"platform-manifest @ git+https://github.com/ProtocolWarden/PlatformManifest.git@v1.0.0",
]
[project.scripts]
operations-center-setup = "operations_center.entrypoints.setup.main:app"
operations-center-audit = "operations_center.entrypoints.audit.main:app"
operations-center-artifacts = "operations_center.entrypoints.artifacts.main:app"
operations-center-calibration = "operations_center.entrypoints.calibration.main:app"
operations-center-fixtures = "operations_center.entrypoints.fixtures.main:app"
operations-center-replay = "operations_center.entrypoints.replay.main:app"
operations-center-regression = "operations_center.entrypoints.regression.main:app"
operations-center-governance = "operations_center.entrypoints.governance.main:app"
# Audit + maintenance trinity (added 2026-04-28). See docs/architecture/
# {ghost_work,flow,code_health}_audit.md for the catalogs each scanner enforces.
operations-center-ghost-audit = "operations_center.entrypoints.ghost_audit.main:main"
operations-center-flow-audit = "operations_center.entrypoints.flow_audit.main:main"
# Cross-repo Custodian sweep — runs custodian-audit against every managed repo
# with a local checkout and a .custodian.yaml, emits one Plane task per repo
# with --emit. Read-only against the managed repos; mutates Plane only.
operations-center-custodian-sweep = "operations_center.entrypoints.custodian_sweep.main:main"
# code_health_audit moved to Custodian (2026-04-29). Run `custodian-audit
# --repo .` instead. The OC-specific detectors (OC1-OC9) live in
# _custodian/detectors.py and are wired via .custodian.yaml.
operations-center-recover-stale = "operations_center.entrypoints.maintenance.recover_stale:main"
operations-center-cleanup-state = "operations_center.entrypoints.maintenance.cleanup_state:main"
operations-center-close-stale-prs = "operations_center.entrypoints.maintenance.close_stale_prs:main"
operations-center-cleanup-stale-backlog = "operations_center.entrypoints.maintenance.cleanup_stale_backlog:main"
operations-center-check-regressions = "operations_center.entrypoints.maintenance.check_regressions:main"
operations-center-triage-scan = "operations_center.entrypoints.maintenance.triage_scan:main"
# Operator one-shots — added 2026-04-28 from audit triage Group B.
operations-center-autonomy-tiers = "operations_center.entrypoints.autonomy_tiers.main:main"
operations-center-ci-monitor = "operations_center.entrypoints.ci_monitor.main:main"
# Phase 13 — re-audit trigger evaluator. Cron-friendly; nonzero exit when stale.
operations-center-reaudit-check = "operations_center.entrypoints.reaudit_check.main:main"
# Manifest primitive — diagnose EffectiveRepoGraph wiring (R4.1).
operations-center-graph-doctor = "operations_center.entrypoints.graph_doctor.main:main"
# Cross-repo task chaining — manual trigger (R5.2).
operations-center-propagate = "operations_center.entrypoints.propagate.main:main"
# Cross-repo task chaining — inspect parent-child chains (R5.5).
operations-center-propagation-links = "operations_center.entrypoints.propagation_links.main:main"
# Phase 14 fork-management engine extracted to SourceRegistry.
# Use the `source-registry` CLI directly with
# --registry registry/source_registry.yaml
# --patches registry/patches
# ER-001 — Repo Graph primitive extracted to PlatformManifest.
# Use the `platform-manifest` CLI directly (provided by that package).
# ER-002 — Run Memory primitive.
operations-center-run-memory = "operations_center.run_memory.cli:app"
# Archon health probe (see PlatformDeployment compose/profiles/archon.yml).
# Workflow dispatch is not yet wired — see backlog.
operations-center-archon-probe = "operations_center.entrypoints.archon_probe.main:main"
# Single-command provenance reader — prints OC↔RxP↔SwitchBoard chain
# from execution_trace.json alone. Hardening arc item 3.
operations-center-run-show = "operations_center.entrypoints.run_show.main:main"
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"ruff>=0.5",
"ty>=0.0.28",
"custodian @ git+https://github.com/ProtocolWarden/Custodian.git@main",
]
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
pythonpath = ["src", "."]
testpaths = ["tests"]
filterwarnings = [
"ignore:cannot collect test class:pytest.PytestCollectionWarning",
]
markers = [
"integration: tests that require a live external service (run with: pytest tests/integration/ -v)",
]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
# Tool-side replacements for Custodian native detectors deprecated under the
# "use the tool first" principle. See Custodian docs/design/detector_disposition_matrix.md.
extend-select = [
"T201", # C2 — print()
"S101", # C40 — assert in prod
"S324", # C31 — weak hash
"DTZ001", "DTZ003", "DTZ005", "DTZ006", "DTZ007", # C10 — naive datetime
"G004", # C15 — f-string in logger
"B006", # C38 — mutable default arg
"B028", # C42 — warnings.warn no stacklevel
"PLC1802", # C17 — len(x) == 0
"TRY002", # C20 — raise vanilla Exception
"TRY203", # D9 — useless try/except
"PGH003", # C35 — bare # type: ignore
"RET503", # D8 — implicit return
"N818", # N1 — exception class naming
]
# Dropped (too noisy across codebase, real legitimate uses):
# S110 — try/except/pass — used in cleanup paths and maintenance code
# S602/S603 — subprocess invocations — heavily used in adapters / CLI / setup
# BLE001 — blind except — codebase uses defensive top-level handlers
[tool.ruff.lint.per-file-ignores]
# Tests use `assert`, may patch subprocess, can have broad excepts in
# fixtures, intentionally use vanilla Exception, and may print for
# debug visibility — none of these are real violations there.
"tests/**/*.py" = [
"S101",
"S110",
"S602", "S603",
"BLE001",
"DTZ001", "DTZ003", "DTZ005", "DTZ006", "DTZ007",
"B006", "B028",
"PLC1802",
"TRY002", "TRY203",
"PGH003",
"RET503",
"G004",
"T201",
]
# CLI scripts and entrypoints are allowed to print() and broad-except.
"scripts/**/*.py" = ["T201", "BLE001", "S110"]
"src/operations_center/entrypoints/**/*.py" = ["T201"]
# Tools / one-shots
"tools/**/*.py" = ["T201", "BLE001"]
[tool.ty.environment]
python-version = "3.11"