sharpit 0.2.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sharpit-0.2.0 → sharpit-0.4.0}/CHANGELOG.md +56 -1
- {sharpit-0.2.0 → sharpit-0.4.0}/PKG-INFO +131 -30
- sharpit-0.4.0/README.md +198 -0
- sharpit-0.4.0/SECURITY.md +34 -0
- sharpit-0.4.0/action.yml +80 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/docs/README.md +2 -0
- sharpit-0.4.0/docs/development/ci.md +37 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/docs/development/workflow.md +51 -0
- sharpit-0.4.0/docs/reference/BOOTUI-CONTRACT-0.4-DRIFT.md +1182 -0
- sharpit-0.4.0/docs/reference/BOOTUI-CONTRACT-0.4-WAVE-A.md +127 -0
- sharpit-0.4.0/docs/reference/BOOTUI-CONTRACT-0.4-WAVE-B.md +943 -0
- sharpit-0.4.0/docs/reference/BOOTUI-CONTRACT-0.4-WAVE-C.md +1642 -0
- sharpit-0.4.0/docs/reference/PARITY.md +52 -0
- sharpit-0.4.0/docs/reference/report.schema.json +236 -0
- sharpit-0.4.0/docs/reports/2026-11-01-0.3.0-retrospective.md +69 -0
- sharpit-0.4.0/docs/reports/2026-11-01-gflow-cli-sharpit.md +50 -0
- sharpit-0.4.0/docs/reports/2026-11-02-0.4.0-decisions.md +79 -0
- sharpit-0.4.0/docs/reports/2026-11-02-0.4.0-overnight-retrospective.md +51 -0
- sharpit-0.4.0/docs/reports/2026-11-02-g1g2-red-audit.md +69 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/examples/fastapi_sqla/app.py +43 -1
- sharpit-0.4.0/examples/fastapi_sqla/tests_gate/conftest.py +29 -0
- sharpit-0.4.0/examples/fastapi_sqla/tests_gate/test_owners_gate.py +16 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/pyproject.toml +11 -0
- sharpit-0.4.0/sonar-baseline.txt +1 -0
- sharpit-0.4.0/src/sharpit/__init__.py +8 -0
- sharpit-0.4.0/src/sharpit/engine/advisors/dismissals.py +348 -0
- sharpit-0.4.0/src/sharpit/engine/advisors/findings.py +107 -0
- sharpit-0.4.0/src/sharpit/engine/advisors/registry.py +91 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/advisors/report.py +37 -4
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/advisors/retention.py +19 -10
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/capture/__init__.py +11 -2
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/capture/correlation.py +2 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/capture/sqltrace.py +61 -3
- sharpit-0.4.0/src/sharpit/engine/capture/traces.py +425 -0
- sharpit-0.4.0/src/sharpit/engine/collectors/data.py +237 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/overview.py +6 -0
- sharpit-0.4.0/src/sharpit/engine/collectors/postgresql/__init__.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/collectors/postgresql/limits.py +67 -0
- sharpit-0.4.0/src/sharpit/engine/collectors/postgresql/queries.py +223 -0
- sharpit-0.4.0/src/sharpit/engine/collectors/postgresql/querytext.py +98 -0
- sharpit-0.4.0/src/sharpit/engine/collectors/postgresql/sections.py +619 -0
- sharpit-0.4.0/src/sharpit/engine/collectors/postgresql/service.py +403 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/restapi/rules.py +84 -18
- sharpit-0.4.0/src/sharpit/engine/collectors/restapi/service.py +215 -0
- sharpit-0.4.0/src/sharpit/engine/collectors/sqlastats.py +155 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/context.py +11 -1
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/guard.py +8 -6
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/masking.py +29 -1
- sharpit-0.4.0/src/sharpit/engine/otel.py +116 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/panels.py +24 -2
- sharpit-0.4.0/src/sharpit/engine/panels04/__init__.py +55 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/architecture.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/data.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/database_advisor.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/fastapi.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/fastapi_security.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/mysql.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/postgresql.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/security.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/security_logs.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/sqlalchemy_statistics.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/traces.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/panels04/transactions.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/sources/__init__.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/sources/dispatch.py +185 -0
- sharpit-0.4.0/src/sharpit/engine/sources/sqlite.py +363 -0
- sharpit-0.4.0/src/sharpit/engine/sqla.py +717 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/__init__.py +4 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/baseline.py +137 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/facts.py +216 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/filters.py +29 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/finish.py +69 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/gates.py +189 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/outcome.py +339 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/partial.py +41 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/report.py +190 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/report.schema.json +236 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/sink.py +272 -0
- sharpit-0.4.0/src/sharpit/engine/testsession/swallowed.py +178 -0
- sharpit-0.4.0/src/sharpit/engine/tool_dispatch.py +281 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/tools.py +44 -247
- sharpit-0.4.0/src/sharpit/engine/tools04/__init__.py +1 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/architecture.py +2 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/data.py +15 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/database_advisor.py +2 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/fastapi.py +2 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/fastapi_security.py +2 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/mysql.py +2 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/postgresql.py +83 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/security.py +2 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/security_logs.py +2 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/sql_trace.py +2 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/sqlalchemy_statistics.py +29 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/traces.py +36 -0
- sharpit-0.4.0/src/sharpit/engine/tools04/transactions.py +2 -0
- sharpit-0.4.0/src/sharpit/fastapi/adapter.py +262 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/fastapi/capture.py +67 -5
- sharpit-0.4.0/src/sharpit/fastapi/install.py +207 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/__init__.py +662 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/data.py +29 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/dismissed_findings.py +84 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/fastapi.py +0 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/fastapi_security.py +0 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/mysql.py +0 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/postgresql.py +35 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/security.py +0 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/security_logs.py +0 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/sql_trace.py +0 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/sqlalchemy_statistics.py +23 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/traces.py +46 -0
- sharpit-0.4.0/src/sharpit/fastapi/routes/transactions.py +0 -0
- sharpit-0.4.0/src/sharpit/fastapi/sources.py +32 -0
- sharpit-0.4.0/src/sharpit/py.typed +0 -0
- sharpit-0.4.0/src/sharpit/pytest_plugin/__init__.py +587 -0
- sharpit-0.4.0/src/sharpit/pytest_plugin/apps.py +256 -0
- sharpit-0.4.0/src/sharpit/pytest_plugin/marker.py +34 -0
- sharpit-0.4.0/src/sharpit/pytest_plugin/options.py +136 -0
- sharpit-0.4.0/src/sharpit/pytest_plugin/report_io.py +130 -0
- sharpit-0.4.0/src/sharpit/pytest_plugin/session.py +203 -0
- sharpit-0.4.0/src/sharpit/pytest_plugin/swallowed.py +147 -0
- sharpit-0.4.0/src/sharpit/pytest_plugin/terminal.py +87 -0
- sharpit-0.4.0/src/sharpit/report/__init__.py +1 -0
- sharpit-0.4.0/src/sharpit/report/__main__.py +38 -0
- sharpit-0.4.0/src/sharpit/report/summary.py +84 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/settings.py +45 -2
- sharpit-0.4.0/src/sharpit/ui/static/assets/index-CUe0uMX3.js +15 -0
- sharpit-0.2.0/src/sharpit/ui/static/assets/index-DuLAbl33.css → sharpit-0.4.0/src/sharpit/ui/static/assets/index-DqyQyF0M.css +1 -1
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/ui/static/index.html +2 -2
- sharpit-0.4.0/tests/action/test_action_definition.py +223 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/complexity_baseline.json +2 -2
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/conftest.py +63 -1
- sharpit-0.4.0/tests/data_support.py +28 -0
- sharpit-0.4.0/tests/docs/test_procurement_docs.py +313 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/advisors/test_advisor_report.py +15 -0
- sharpit-0.4.0/tests/engine/advisors/test_dismissals.py +521 -0
- sharpit-0.4.0/tests/engine/advisors/test_findings.py +147 -0
- sharpit-0.4.0/tests/engine/advisors/test_registry.py +98 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/capture/test_sqltrace.py +35 -0
- sharpit-0.4.0/tests/engine/capture/test_sqltrace_totals.py +142 -0
- sharpit-0.4.0/tests/engine/capture/test_traces.py +505 -0
- sharpit-0.4.0/tests/engine/postgresql/__init__.py +0 -0
- sharpit-0.4.0/tests/engine/postgresql/fakes.py +212 -0
- sharpit-0.4.0/tests/engine/postgresql/test_limits.py +76 -0
- sharpit-0.4.0/tests/engine/postgresql/test_querytext.py +103 -0
- sharpit-0.4.0/tests/engine/postgresql/test_sections.py +543 -0
- sharpit-0.4.0/tests/engine/postgresql/test_service.py +345 -0
- sharpit-0.4.0/tests/engine/restapi/test_restapi_findings.py +354 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/restapi/test_restapi_report.py +2 -0
- sharpit-0.4.0/tests/engine/restapi/test_swallowed_rule.py +73 -0
- sharpit-0.4.0/tests/engine/test_data.py +596 -0
- sharpit-0.4.0/tests/engine/test_dispatch.py +207 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_guard.py +12 -0
- sharpit-0.4.0/tests/engine/test_headers.py +65 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_import_boundary.py +45 -2
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_masking.py +59 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_mcp.py +4 -20
- sharpit-0.4.0/tests/engine/test_n_plus_one_overhead.py +100 -0
- sharpit-0.4.0/tests/engine/test_otel.py +140 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_overview.py +40 -1
- sharpit-0.4.0/tests/engine/test_panel04_registry.py +37 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_panels.py +8 -2
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_sqla.py +199 -1
- sharpit-0.4.0/tests/engine/test_sqla_read_only.py +297 -0
- sharpit-0.4.0/tests/engine/test_sqlastats.py +341 -0
- sharpit-0.4.0/tests/engine/test_sqlite_overhead.py +57 -0
- sharpit-0.4.0/tests/engine/test_sqlite_source.py +400 -0
- sharpit-0.4.0/tests/engine/test_swallowed_overhead.py +75 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_tools.py +74 -1
- sharpit-0.4.0/tests/engine/testsession/test_baseline.py +172 -0
- sharpit-0.4.0/tests/engine/testsession/test_filters.py +45 -0
- sharpit-0.4.0/tests/engine/testsession/test_finish.py +36 -0
- sharpit-0.4.0/tests/engine/testsession/test_gates.py +366 -0
- sharpit-0.4.0/tests/engine/testsession/test_outcome.py +393 -0
- sharpit-0.4.0/tests/engine/testsession/test_partial.py +39 -0
- sharpit-0.4.0/tests/engine/testsession/test_report.py +419 -0
- sharpit-0.4.0/tests/engine/testsession/test_sink.py +472 -0
- sharpit-0.4.0/tests/engine/testsession/test_swallowed.py +320 -0
- sharpit-0.4.0/tests/engine/testsession/tsfakes.py +109 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_capture_hooks.py +9 -1
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_capture_wiring.py +3 -1
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_cli_api.py +7 -27
- sharpit-0.4.0/tests/fastapi/test_data_api.py +188 -0
- sharpit-0.4.0/tests/fastapi/test_dismissed_findings_api.py +200 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_dismissed_rules_api.py +37 -1
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_install.py +4 -23
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_mcp_api.py +3 -2
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_panel_availability.py +2 -1
- sharpit-0.4.0/tests/fastapi/test_postgresql_api.py +164 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_rest_api_api.py +6 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_sql_trace_api.py +3 -2
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_sqla_absent.py +17 -3
- sharpit-0.4.0/tests/fastapi/test_sqlalchemy_statistics_api.py +126 -0
- sharpit-0.4.0/tests/fastapi/test_sqlite_console.py +193 -0
- sharpit-0.4.0/tests/fastapi/test_traces_api.py +251 -0
- sharpit-0.4.0/tests/fastapi/test_traces_overhead.py +36 -0
- sharpit-0.4.0/tests/fastapi/test_unimplemented_panel_surface.py +64 -0
- sharpit-0.4.0/tests/fixtures/apps/swallowed_exception/cases.py +16 -0
- sharpit-0.4.0/tests/fixtures/apps/swallowed_exception/weekapp.py +32 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/activity/captured.json +246 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/activity/journal.captured.json +32 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/activity/resources.captured.json +54 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/activity/service-map.captured.json +97 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/architecture/captured.json +43 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/beans/captured.json +33 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/cli/captured.json +29 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/config/captured.json +175 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/data/nullable.json +4 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/data/repositories.captured.json +5 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/database-advisor/captured.json +51 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/database-connection-pools/pools.captured.json +32 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/dismissed-findings/captured.json +4 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/dismissed-rules/captured.json +3 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/exceptions/captured.json +30 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/exceptions/caught.captured.json +9 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/fastapi/captured.json +41 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/fastapi-security/captured.json +23 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/fastapi-security/endpoints.captured.json +19 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/health/captured.json +24 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/http-exchanges/captured.json +99 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/http-exchanges/routes.captured.json +50 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/http-probe/captured.json +11 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/ids.json +33 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/log-tail/recent.captured.json +10 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/loggers/captured.json +27 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/mappings/flat.captured.json +34 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/mcp-server/captured.json +33 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/meta.json +11 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/mysql/captured.json +13 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/overview/captured.json +32 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/overview/nullable.json +4 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/panels/captured.json +23 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/postgresql/captured.json +198 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/postgresql/nullable.json +45 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/rest-api/captured.json +70 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/rest-api/error-contract.captured.json +38 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/security/captured.json +41 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/security-logs/captured.json +36 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/sql-trace/captured.json +211 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/sql-trace/insights.captured.json +120 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/sqlalchemy-statistics/nullable.json +18 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/threads/captured.json +98 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/traces/captured.json +35 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/traces/nullable.json +3 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/transactions/captured.json +82 -0
- sharpit-0.4.0/tests/fixtures/bootui/2.2.0/vulnerabilities/captured.json +62 -0
- sharpit-0.4.0/tests/fixtures/getenv_corpus/pkg/__init__.py +0 -0
- sharpit-0.4.0/tests/fixtures/report-summary-baseline.md +18 -0
- sharpit-0.4.0/tests/fixtures/report-summary.md +14 -0
- sharpit-0.4.0/tests/golden.py +146 -0
- sharpit-0.4.0/tests/masking/test_a_postgresql_masking.py +84 -0
- sharpit-0.4.0/tests/masking/test_a_sqlalchemy_statistics_masking.py +45 -0
- sharpit-0.4.0/tests/masking/test_a_traces_masking.py +62 -0
- sharpit-0.4.0/tests/masking/test_d1_masking.py +41 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/overhead.py +7 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_apps.py +294 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_attribution.py +157 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_bad_baseline.py +51 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_baseline.py +225 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_facts.py +21 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_gate_defaults.py +318 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_gates.py +743 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_inert.py +174 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_marker.py +42 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_options.py +114 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_report_only.py +28 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_reports.py +152 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_swallowed.py +280 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_terminal.py +94 -0
- sharpit-0.4.0/tests/pytest_plugin/test_plugin_xdist.py +265 -0
- sharpit-0.4.0/tests/safety/README.md +19 -0
- sharpit-0.4.0/tests/safety/__init__.py +146 -0
- sharpit-0.4.0/tests/safety/test_a_data_safety.py +52 -0
- sharpit-0.4.0/tests/safety/test_a_postgresql_safety.py +98 -0
- sharpit-0.4.0/tests/safety/test_a_sqlalchemy_statistics_safety.py +44 -0
- sharpit-0.4.0/tests/safety/test_a_traces_safety.py +48 -0
- sharpit-0.4.0/tests/safety/test_d1_safety.py +54 -0
- sharpit-0.4.0/tests/surface.py +165 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_conformance.py +83 -0
- sharpit-0.4.0/tests/test_context_isolation.py +28 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_example_app.py +29 -0
- sharpit-0.4.0/tests/test_example_gate.py +54 -0
- sharpit-0.4.0/tests/test_foundation_capture_setup.py +39 -0
- sharpit-0.4.0/tests/test_foundation_extension_slots.py +214 -0
- sharpit-0.4.0/tests/test_foundation_review_fixes.py +38 -0
- sharpit-0.4.0/tests/test_foundation_round2.py +261 -0
- sharpit-0.4.0/tests/test_foundation_round3.py +52 -0
- sharpit-0.4.0/tests/test_foundation_runtime_types.py +36 -0
- sharpit-0.4.0/tests/test_foundation_split_compat.py +33 -0
- sharpit-0.4.0/tests/test_foundation_structure.py +106 -0
- sharpit-0.4.0/tests/test_foundation_suite_equivalence.py +40 -0
- sharpit-0.4.0/tests/test_golden.py +109 -0
- sharpit-0.4.0/tests/test_golden_shapes.py +60 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_masking_corpus.py +98 -1
- sharpit-0.4.0/tests/test_no_secret_shaped_literals.py +42 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_overhead_harness.py +16 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_packaging.py +2 -2
- sharpit-0.4.0/tests/test_report_schema.py +75 -0
- sharpit-0.4.0/tests/test_report_summary.py +231 -0
- sharpit-0.4.0/tests/test_safety_lane_sweeps.py +194 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_safety_matrix.py +28 -23
- sharpit-0.4.0/tests/test_sanitize_golden.py +145 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_settings.py +18 -0
- sharpit-0.4.0/tests/test_surface_follows_flags.py +87 -0
- sharpit-0.4.0/website/docs/deviations.md +31 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/docs/index.md +1 -1
- {sharpit-0.2.0 → sharpit-0.4.0}/website/docs/installation.md +3 -3
- sharpit-0.4.0/website/docs/pytest-plugin.md +203 -0
- sharpit-0.4.0/website/docs/report.md +162 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/docs/settings.md +2 -1
- sharpit-0.4.0/website/docs/sql-sources.md +95 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/mkdocs.yml +3 -0
- sharpit-0.2.0/README.md +0 -101
- sharpit-0.2.0/sonar-baseline.txt +0 -1
- sharpit-0.2.0/src/sharpit/__init__.py +0 -7
- sharpit-0.2.0/src/sharpit/engine/advisors/dismissals.py +0 -141
- sharpit-0.2.0/src/sharpit/engine/collectors/restapi/service.py +0 -108
- sharpit-0.2.0/src/sharpit/engine/sqla.py +0 -418
- sharpit-0.2.0/src/sharpit/fastapi/adapter.py +0 -784
- sharpit-0.2.0/src/sharpit/ui/static/assets/index-Buho1zW1.js +0 -14
- sharpit-0.2.0/tests/engine/advisors/test_dismissals.py +0 -197
- sharpit-0.2.0/tests/engine/test_headers.py +0 -31
- sharpit-0.2.0/tests/test_sanitize_golden.py +0 -16
- sharpit-0.2.0/website/docs/deviations.md +0 -5
- {sharpit-0.2.0 → sharpit-0.4.0}/.gitattributes +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/.gitignore +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/LICENSE +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/NOTICE +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/docs/development/overhead-budgets.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/docs/reference/BOOTUI-CONTRACT-MVP.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/docs/reference/BOOTUI-PYTHON-MAPPING.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/docs/reports/2026-10-31-dogfood-klipermedia.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/docs/reports/2026-10-31-mvp-retrospective.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/docs/reports/2026-10-31-mvp-summary.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/examples/fastapi_sample/app.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/examples/fastapi_sample/static/hello.txt +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/examples/fastapi_sqla/__init__.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/examples/fastapi_sqla/alembic.ini +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/examples/fastapi_sqla/migrations/env.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/examples/fastapi_sqla/migrations/script.py.mako +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/examples/fastapi_sqla/migrations/versions/0001_owners.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/examples/fastapi_sqla/migrations/versions/0002_pets.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/examples/fastapi_sqla/migrations/versions/0003_visits.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/sonar-project.properties +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/__init__.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/activation.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/advisors/__init__.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/advisors/rules.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/capture/activity.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/capture/exceptions.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/capture/exchanges.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/capture/frames.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/capture/logtail.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/capture/streams.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/__init__.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/alembic.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/beans.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/config/__init__.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/config/getenv_scan.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/config/settings_source.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/health.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/loggers.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/mappings.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/pools.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/restapi/__init__.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/restapi/report.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/threads.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/vulns/__init__.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/vulns/cvss.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/vulns/epss.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/vulns/interpreter.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/vulns/inventory.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/vulns/osv.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/collectors/vulns/service.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/daemon_executor.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/headers.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/mcp.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/paging.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/probe.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/relaxed.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/singleflight.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/engine/spi.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/fastapi/__init__.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/fastapi/http.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/fastapi/introspector.py +0 -0
- /sharpit-0.2.0/src/sharpit/py.typed → /sharpit-0.4.0/src/sharpit/fastapi/routes/architecture.py +0 -0
- /sharpit-0.2.0/tests/fixtures/getenv_corpus/pkg/__init__.py → /sharpit-0.4.0/src/sharpit/fastapi/routes/database_advisor.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/fastapi/signals.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/src/sharpit/fastapi/sse.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/advisors/test_advisor_rules.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/advisors/test_retention.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/capture/test_activity.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/capture/test_correlation.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/capture/test_exceptions.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/capture/test_exchanges.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/capture/test_logtail.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/capture/test_streams.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/config/test_config_report.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/config/test_getenv_scan.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/config/test_settings_source.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/restapi/test_restapi_registry.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/restapi/test_restapi_rules.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_activation.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_alembic.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_beans.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_context.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_health.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_loggers.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_mappings.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_paging.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_pools.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_probe.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_relaxed.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_singleflight.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/test_threads.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/vulns/test_cvss.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/vulns/test_epss.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/vulns/test_interpreter.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/vulns/test_inventory.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/vulns/test_osv.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/vulns/test_service.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/engine/vulns/vulnfakes.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_activity_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_alembic_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_capture_overhead.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_change_streams.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_concurrency.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_exceptions_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_health_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_http_exchanges_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_http_probe_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_introspector_providers.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_introspector_routes.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_log_tail_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_loggers_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_pools_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_signals.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_sql_trace_overhead.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_stream_lifetime.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_threads_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fastapi/test_vulns_api.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/branch_merge/alembic.ini +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/branch_merge/migrations/versions/base.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/branch_merge/migrations/versions/left.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/branch_merge/migrations/versions/merge.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/branch_merge/migrations/versions/right.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/branch_merge/migrations/versions/side.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/branch_merge/migrations/versions/tip.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/broken/alembic.ini +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/broken/migrations/versions/not_a_revision.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/broken/migrations/versions/ok1_fine.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/linear/alembic.ini +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/linear/migrations/env.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/linear/migrations/versions/a1_create_owners.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/linear/migrations/versions/b2_add_pets.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/linear/migrations/versions/c3_add_visits.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/modern_template/alembic.ini +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/modern_template/migrations/versions/1f2e3d4c5b6a_initial.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/modern_template/migrations/versions/9a8b7c6d5e4f_add_index.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/package_dir/alembic.ini +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/package_dir/sharpit_alembic_fixture_pkg/__init__.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/alembic/package_dir/sharpit_alembic_fixture_pkg/migrations/versions/p1_first.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/bootui/beans.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/bootui/config.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/bootui/health.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/bootui/loggers.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/bootui/mappings.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/bootui/meta.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/bootui/overview.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/bootui/panels.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/bootui/vulnerabilities.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/bootui_tools_0_2_0.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/epss/CVE-2024-34064.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/getenv_corpus/pkg/forms.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/osv/GHSA-h75v-3vvj-5mfj.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/osv/PYSEC-2017-9999.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/osv/querybatch.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/fixtures/restapi/rest_api_check_ids.txt +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/pytest_speed_exceptions.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_code_shape.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_dogfood_sqla.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_durations.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_durations.meta.json +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_fixtures.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_overhead_check.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_pytest_speed_check.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_release_workflow.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_sonar_ratchet.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/tests/test_sqla_sample_smoke.py +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/docs/activation.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/docs/how-it-works.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/docs/mcp.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/docs/panels.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/docs/quickstart.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/docs/safety.md +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/requirements.in +0 -0
- {sharpit-0.2.0 → sharpit-0.4.0}/website/requirements.txt +0 -0
|
@@ -5,6 +5,59 @@ and the project uses [Semantic Versioning](https://semver.org/).
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.4.0] - 2026-11-02
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `traces` panel: OpenTelemetry spans from the application's own SDK `TracerProvider`, with SQL literals in `db.statement` normalised and masked; MCP `get_traces`. sharpit never imports OpenTelemetry or installs a provider, it attaches one span processor to the provider the app already set up.
|
|
13
|
+
- `data` panel: SQLAlchemy 2.0 mapped classes (table, primary-key type, relationships) from the new `install(models=...)` keyword (a declarative base, registry, or a list of them or of mapped classes); MCP `get_data_repositories`. sharpit never configures mappers or runs SQL to read them.
|
|
14
|
+
- `postgresql` panel: vital signs, sessions, statements, indexes, tables, vacuum, replication and settings, read on an explicit `POST {api}/postgresql/read` in one read-only transaction with statement and lock timeouts, a read budget and row limits; query text masked (numbers and comments too). `GET` returns the last read; MCP `get_postgresql_report`. `pg_stat_statements` created but not preloaded makes that section `SKIPPED`.
|
|
15
|
+
- `sqlalchemy-statistics` panel (BootUI's `hibernate-statistics`): statement counts from SQL Trace's lifetime totals, the slowest statement and N+1 candidates per route; Hibernate-only counters are `null` with a reason; MCP `get_sqlalchemy_statistics`.
|
|
16
|
+
- Per-finding dismissal: `GET`, `POST` and `DELETE {api}/dismissed-findings` (BootUI 2.2.0), stored under `dismissedFindings` in `sharpit.yml`; mutations check the owning panel is enabled and writable.
|
|
17
|
+
- Report-only mode (`--sharpit-report-only`, ini `sharpit_report_only`): findings never fail the build, any unknown reason still does. The report gains `mode` and `unknownReasons`.
|
|
18
|
+
- Baselines: `--sharpit-baseline=PATH` (ini `sharpit_baseline`) and `--sharpit-write-baseline=PATH`. A baselined finding is `existing` and does not fail, an unlisted one is `new`, a missing one `fixed`; a count gate above its baselined count is `new`. Writing refuses a partial run or one with unknown reasons. Vulnerability findings are not baselined.
|
|
19
|
+
- GitHub Action (`action.yml` at the repository root) that runs pytest with sharpit, report-only by default, and writes a findings summary to the job summary; `python -m sharpit.report summary <report.json>` renders that Markdown.
|
|
20
|
+
- `sharpit.swallowed-exception` gate: during a test, an exception handled by a broad `except` in application code that neither re-raises nor logs is a finding. It fails the test for programming errors (`AttributeError`, `TypeError`, `NameError`, `ImportError`, `UnboundLocalError`) and is an INFO note otherwise; marker `@pytest.mark.sharpit(allow_swallowed=True)` relaxes it.
|
|
21
|
+
- N+1 findings caused by a SQLAlchemy lazy load name the relationship (`Player.performances lazy-loaded 1018 times`), suggest `selectinload` or `joinedload`, and give the application line of the first lazy load and the masked statement. Fingerprints are unchanged.
|
|
22
|
+
- App autodetection for `pytest --sharpit`: the one FastAPI or Starlette app already imported by the suite is used without `--sharpit-app`; `--sharpit-require-app` (ini `sharpit_require_app`) restores the 0.3.0 fail-closed behaviour.
|
|
23
|
+
- `--sharpit-verbose` (or `-vv`) lists every advisor note in the terminal.
|
|
24
|
+
- Overview run metadata from BootUI 2.2.0.
|
|
25
|
+
- `SECURITY.md`: supported versions, private reporting, and the network-egress statement (only the OSV and EPSS clients use the network).
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- With no single app (none, several, or one without routes), the `rest-api` advisor is `SKIPPED` rather than `unknown`, so a clean suite passes; the advisor run status gains `SKIPPED` (additive in `sharpit-report/1`).
|
|
30
|
+
- The terminal gate counts list only findings that fail the gate; other advisor notes become one count line pointing at the report. The JSON and JUnit reports are unchanged.
|
|
31
|
+
- A test-runtime gate finding that failed its test is a JUnit `<failure>` under any `--sharpit-fail-on`.
|
|
32
|
+
- INFO findings never fail a gate, at any `--sharpit-fail-on`.
|
|
33
|
+
- Finding identities in `sharpit.yml` may contain inner spaces; existing entries still parse.
|
|
34
|
+
- The overview view is titled Scorecard, as in BootUI 2.2.0. MCP no longer suggests config property names.
|
|
35
|
+
|
|
36
|
+
### Security
|
|
37
|
+
|
|
38
|
+
- With parameter capture off, SQL Trace, traces and the test report no longer show a double-quoted SQL value or
|
|
39
|
+
secret. The leak affected 0.3.0; upgrade (#41).
|
|
40
|
+
|
|
41
|
+
## [0.3.0] - 2026-11-01
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- Finding contract (`Finding`, `AdvisorRun`) and advisor registry with pass/fail/unknown status semantics (#19).
|
|
46
|
+
- `pytest --sharpit` plugin with test-id tagging, unattributed bucket, phase split, xdist merge, and JSON (`sharpit-report/1`) and JUnit reports (#20). Count gates (queries per test with `--sharpit-max-queries`, N+1, swallowed exceptions) fail the test; advisor findings at or above `--sharpit-fail-on` fail the run; `unknown` fails it unless `--sharpit-allow-unknown` (limit for unattributed SQL: `--sharpit-max-unattributed`).
|
|
47
|
+
- Per-test budget marker `@pytest.mark.sharpit(max_queries=..., allow_n_plus_one=..., max_exceptions=...)` (#21).
|
|
48
|
+
- REST API advisor on the contract, per-finding dismissal via fingerprint in `sharpit.yml`, and panel detail action (#22).
|
|
49
|
+
- Raw `sqlite3` SQL source, unified source dispatcher, and public `attach_sql_sources()` / `detach_sql_sources()` helpers (#23).
|
|
50
|
+
- `SHARPIT_SQL_TRACE_SQLITE3_ENABLED` (`sql_trace_sqlite3_enabled`, default `true`) controls the raw `sqlite3` source in the console; `pytest --sharpit` always attaches it.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- REST API scanner evidence for an app with no routes reports `usable: false, coverageComplete: true` (confirmed-empty scope), matching BootUI.
|
|
55
|
+
- REST API finding targets now name the handler (`<METHOD> <path> <module:qualname>`), so two handlers on one route stay two findings; fingerprints of 0.3.0 REST API findings depend on it.
|
|
56
|
+
- The test-session SQL filter treats migration tables (`alembic_version`, `schema_migrations`, `flyway_schema_history`, `django_migrations`, `knex_migrations`) as noise, not only `alembic_version`.
|
|
57
|
+
- A rule whose every occurrence is dismissed by fingerprint stays `dismissed: false` with a count of 0.
|
|
58
|
+
- The JUnit report fails only non-dismissed findings at or above `--sharpit-fail-on`.
|
|
59
|
+
- Secret values matching vendor token prefixes (`sk_live_`, `sk_test_`, `ghp_`, `glpat-`, `xoxb-`, `AIza`, `sk-ant-`, `sk-proj-`, and related keys) are masked.
|
|
60
|
+
|
|
8
61
|
## [0.2.0] - 2026-10-31
|
|
9
62
|
|
|
10
63
|
### Added
|
|
@@ -89,6 +142,8 @@ Listed in section 14 of the design spec. The main ones:
|
|
|
89
142
|
- Behind a TLS-terminating proxy, uvicorn needs `--proxy-headers` for the Origin check to pass.
|
|
90
143
|
- Masking is name- and shape-based: vendor-prefixed tokens under harmless names (`sk_live_...`, `ghp_...`) can show.
|
|
91
144
|
|
|
92
|
-
[Unreleased]: https://github.com/ffroliva/sharpit/compare/v0.
|
|
145
|
+
[Unreleased]: https://github.com/ffroliva/sharpit/compare/v0.4.0...HEAD
|
|
146
|
+
[0.4.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.4.0
|
|
147
|
+
[0.3.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.3.0
|
|
93
148
|
[0.2.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.2.0
|
|
94
149
|
[0.1.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.1.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sharpit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Embedded, local-only developer console for Python apps (a port of BootUI).
|
|
5
5
|
Project-URL: Homepage, https://github.com/ffroliva/sharpit
|
|
6
6
|
Project-URL: Source, https://github.com/ffroliva/sharpit
|
|
@@ -36,8 +36,12 @@ Requires-Dist: aiosqlite>=0.20; extra == 'test'
|
|
|
36
36
|
Requires-Dist: alembic>=1.13; extra == 'test'
|
|
37
37
|
Requires-Dist: fastapi>=0.115; extra == 'test'
|
|
38
38
|
Requires-Dist: httpx>=0.27; extra == 'test'
|
|
39
|
+
Requires-Dist: jsonschema>=4.21; extra == 'test'
|
|
40
|
+
Requires-Dist: psycopg[binary]>=3.2; extra == 'test'
|
|
39
41
|
Requires-Dist: pydantic-settings>=2.4; extra == 'test'
|
|
42
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'test'
|
|
40
43
|
Requires-Dist: pytest-cov>=5; extra == 'test'
|
|
44
|
+
Requires-Dist: pytest-rerunfailures>=14; extra == 'test'
|
|
41
45
|
Requires-Dist: pytest-timeout>=2.3; extra == 'test'
|
|
42
46
|
Requires-Dist: pytest-xdist>=3.6; extra == 'test'
|
|
43
47
|
Requires-Dist: pytest>=8; extra == 'test'
|
|
@@ -50,6 +54,7 @@ Description-Content-Type: text/markdown
|
|
|
50
54
|
|
|
51
55
|
[](https://github.com/ffroliva/sharpit/actions/workflows/ci.yml)
|
|
52
56
|
[](https://github.com/ffroliva/sharpit/actions/workflows/release.yml)
|
|
57
|
+
[](https://pypi.org/project/sharpit/)
|
|
53
58
|
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
54
59
|
[](https://sonarcloud.io/component_measures?id=ffroliva_sharpit&metric=coverage&branch=main)
|
|
55
60
|
|
|
@@ -64,38 +69,85 @@ Description-Content-Type: text/markdown
|
|
|
64
69
|
[](https://github.com/astral-sh/ruff)
|
|
65
70
|
[](https://github.com/microsoft/pyright)
|
|
66
71
|
|
|
67
|
-
|
|
72
|
+
An embedded, local-only developer console and automated test gate for FastAPI apps.
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
JSON API at `/sharpit/api` inside your own app, so a running service becomes understandable in minutes: its
|
|
71
|
-
configuration and where each value came from, every route, the dependency providers, loggers you can retune live,
|
|
72
|
-
and a vulnerability scan of the installed packages.
|
|
74
|
+
## Gate CI on findings
|
|
73
75
|
|
|
74
|
-
sharpit
|
|
75
|
-
|
|
76
|
+
sharpit turns runtime capture into automated test gates with `pytest --sharpit`. It tracks SQL
|
|
77
|
+
statements and observable exceptions per test, detects N+1 queries, checks query budgets, and runs
|
|
78
|
+
static analysis advisors. If a test exceeds its query budget, triggers an N+1 query, or swallows an
|
|
79
|
+
unhandled exception, the build fails. When capture cannot see enough to judge, the run status is
|
|
80
|
+
`unknown` and fails closed.
|
|
76
81
|
|
|
77
|
-
|
|
82
|
+
```bash
|
|
83
|
+
pytest --sharpit --sharpit-report=sharpit-report.json --sharpit-junit=sharpit-junit.xml
|
|
84
|
+
```
|
|
78
85
|
|
|
79
|
-
|
|
86
|
+
You no longer need `--sharpit-app` for a typical suite: sharpit picks the one FastAPI or Starlette app defined in the
|
|
87
|
+
project modules your tests already imported (it never imports a module to look). With none, several, or one without
|
|
88
|
+
routes, the REST API advisor is `SKIPPED` and a clean suite still passes; `--sharpit-require-app` makes that `unknown`
|
|
89
|
+
again, as in 0.3.0. The terminal `gate counts:` lists only findings that fail the gate; `--sharpit-verbose` (or `-vv`)
|
|
90
|
+
lists every one. The JSON report and JUnit file always hold every finding.
|
|
80
91
|
|
|
81
|
-
|
|
92
|
+
### Adopting on an existing suite
|
|
82
93
|
|
|
83
|
-
|
|
94
|
+
Start without breaking the build, then freeze what is already there:
|
|
84
95
|
|
|
85
96
|
```bash
|
|
86
|
-
|
|
87
|
-
#
|
|
88
|
-
|
|
97
|
+
pytest --sharpit --sharpit-report-only # report everything, fail on nothing but blindness
|
|
98
|
+
pytest --sharpit --sharpit-write-baseline=sharpit-baseline.json # after a complete run: record today's findings
|
|
99
|
+
pytest --sharpit --sharpit-baseline=sharpit-baseline.json # in CI: only new findings fail
|
|
89
100
|
```
|
|
90
101
|
|
|
91
|
-
|
|
102
|
+
- **Report-only** (`--sharpit-report-only`, ini `sharpit_report_only = true`) runs every gate and advisor and writes the
|
|
103
|
+
report, but findings do not fail tests or the session. An unknown reason still exits 1 unless
|
|
104
|
+
`--sharpit-allow-unknown`: report-only relaxes findings, never blindness.
|
|
105
|
+
- **Baselines** match findings by fingerprint. A listed finding is `existing` and never fails, an unlisted one is `new`
|
|
106
|
+
and gates as usual, a listed one not seen is `fixed`. A count gate that grows past its baselined count is `new`.
|
|
107
|
+
Vulnerability findings are not baselined in 0.4.0, and INFO findings never fail.
|
|
108
|
+
- `--sharpit-write-baseline=PATH` is the only way a baseline is written. It refuses a partial run (`-k`, `-m`, node ids,
|
|
109
|
+
`--lf`, `--deselect`, `-x` stopping early, an interrupt) and a run with any unknown reason.
|
|
110
|
+
- A missing or malformed baseline never switches sharpit off: the session runs and the baseline becomes an unknown
|
|
111
|
+
reason, which fails the run. Own the baseline file in CODEOWNERS, or a PR can baseline its own findings.
|
|
112
|
+
|
|
113
|
+
### GitHub Action
|
|
114
|
+
|
|
115
|
+
The repository root is a composite action (`action.yml`) that runs pytest with sharpit and writes a findings summary to
|
|
116
|
+
the job summary. Pin it to a release tag:
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
- uses: ffroliva/sharpit@<release tag>
|
|
120
|
+
with:
|
|
121
|
+
pytest-args: "-q tests/"
|
|
122
|
+
baseline: sharpit-baseline.json
|
|
123
|
+
```
|
|
92
124
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
125
|
+
Inputs: `pytest-args` (split with Python shlex), `report-only` (default `"true"`: findings are reported, never fail the
|
|
126
|
+
build), `baseline`, `fail-on` (lowest severity that fails), `report-path` (default `sharpit-report.json`), `install`
|
|
127
|
+
(`pip` installs the pinned sharpit; `none` when your project already depends on it, in which case `python` must be
|
|
128
|
+
able to import sharpit) and `runner` (default `python -m pytest`, for example `uv run pytest`). Set `report-only: "false"`
|
|
129
|
+
to gate. The pytest exit code is never masked: the summary step runs `if: always()` and only warns if it fails. The
|
|
130
|
+
summary is rendered by `python -m sharpit.report summary <report.json>`. On Windows runners `runner` and `pytest-args`
|
|
131
|
+
are split in non-POSIX mode so backslashes in paths survive.
|
|
132
|
+
|
|
133
|
+
### Outside proof: gflow-cli
|
|
134
|
+
|
|
135
|
+
Run by sharpit's author on the 0.3.0 integration branch against gflow-cli (a public FastAPI daemon using raw `sqlite3`; see [sharpit's own report](docs/reports/2026-11-01-gflow-cli-sharpit.md)), sharpit ran across **5,662** tests (5 failed by sharpit gates):
|
|
136
|
+
- **0 unattributed SQL statements** across ~53k statements executed (27,997 attributed + 25,092 filtered);
|
|
137
|
+
- **6 N+1 findings**, of which 1 was a real defect, 2 were noise (filtered since 0.3.0), and 3 were expected polling;
|
|
138
|
+
- Proved out-of-code runtime observation without changing production code.
|
|
139
|
+
|
|
140
|
+
## 60 seconds
|
|
97
141
|
|
|
98
|
-
|
|
142
|
+
Install sharpit with the FastAPI host extra:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
pip install "sharpit[fastapi]"
|
|
146
|
+
# or
|
|
147
|
+
uv add "sharpit[fastapi]"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Add one call to your FastAPI app:
|
|
99
151
|
|
|
100
152
|
```python
|
|
101
153
|
from fastapi import FastAPI
|
|
@@ -103,23 +155,57 @@ import sharpit
|
|
|
103
155
|
|
|
104
156
|
app = FastAPI()
|
|
105
157
|
|
|
106
|
-
# Register your application
|
|
107
|
-
# app.add_middleware(...)
|
|
108
|
-
|
|
109
|
-
# Install sharpit after your app's middleware:
|
|
158
|
+
# Register your application middleware first, then mount sharpit:
|
|
110
159
|
sharpit.install(app) # mounts /sharpit and /sharpit/api
|
|
111
160
|
```
|
|
112
161
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
162
|
+
Run tests with sharpit gate reporting:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
pytest --sharpit --sharpit-report=sharpit-report.json
|
|
166
|
+
```
|
|
116
167
|
|
|
117
|
-
Run it
|
|
168
|
+
Run it locally with a dev signal and open <http://127.0.0.1:8000/sharpit/>:
|
|
118
169
|
|
|
119
170
|
```bash
|
|
120
171
|
fastapi dev app.py # or: uvicorn app:app --reload
|
|
121
172
|
```
|
|
122
173
|
|
|
174
|
+
## Overview
|
|
175
|
+
|
|
176
|
+
One call mounts a web console at `/sharpit` and a JSON API at `/sharpit/api` inside your own app,
|
|
177
|
+
so a running service becomes understandable in minutes: its configuration and where each value
|
|
178
|
+
came from, every route, the dependency providers, loggers you can retune live, and a vulnerability
|
|
179
|
+
scan of the installed packages.
|
|
180
|
+
|
|
181
|
+
sharpit is a Python/FastAPI port of [BootUI](https://github.com/jdubois/boot-ui) by Julien Dubois (Apache-2.0),
|
|
182
|
+
the Spring Boot developer console. It ports BootUI's design goals, JSON contract and test cases; the UI is new.
|
|
183
|
+
|
|
184
|
+

|
|
185
|
+
|
|
186
|
+
> **Status: alpha (0.4.0, FastAPI only).** Django and Flask are not supported. See [CHANGELOG.md](https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md).
|
|
187
|
+
|
|
188
|
+
## Installation and extras
|
|
189
|
+
|
|
190
|
+
Python 3.12+. Runtime dependencies are only `starlette>=0.44` and `packaging>=23`.
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
pip install "sharpit[fastapi]"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Optional extras:
|
|
197
|
+
|
|
198
|
+
| Extra | Adds | Why |
|
|
199
|
+
|---|---|---|
|
|
200
|
+
| `sharpit[fastapi]` | `fastapi>=0.115` | the supported host |
|
|
201
|
+
| `sharpit[settings]` | `pydantic-settings>=2.4` | the Config panel shows which source each value came from |
|
|
202
|
+
|
|
203
|
+
## Configuration and activation
|
|
204
|
+
|
|
205
|
+
Call `sharpit.install(app)` after adding your own middleware. Starlette builds middleware from the outside in, so
|
|
206
|
+
calling `install()` last ensures sharpit's capture middleware sits outside your application middleware. This lets sharpit
|
|
207
|
+
measure total request durations and record unhandled errors correctly.
|
|
208
|
+
|
|
123
209
|
Keyword arguments for `sharpit.install()`:
|
|
124
210
|
|
|
125
211
|
- `engines`: optional sequence of SQLAlchemy `Engine` or `AsyncEngine` instances to monitor in connection pools and
|
|
@@ -127,6 +213,18 @@ Keyword arguments for `sharpit.install()`:
|
|
|
127
213
|
- `health_checks`: optional mapping of check names to zero-argument callables (e.g. `health_checks={"cache": ping_cache}`).
|
|
128
214
|
- `alembic_config`: optional path to `alembic.ini` (default `"alembic.ini"`).
|
|
129
215
|
- `settings`: optional pydantic-settings instance or sequence of instances to show configuration provenance.
|
|
216
|
+
- `models`: optional SQLAlchemy 2.0 declarative base, registry, or a list of them or of mapped classes, for the Data
|
|
217
|
+
panel (e.g. `models=Base`). sharpit never configures mappers or runs SQL to read them.
|
|
218
|
+
|
|
219
|
+
With a PostgreSQL engine, the PostgreSQL panel reads vital signs, sessions, statements, indexes, tables, vacuum,
|
|
220
|
+
replication and settings on an explicit `POST /sharpit/api/postgresql/read`: one read-only transaction with statement
|
|
221
|
+
and lock timeouts, a read budget and row limits, query text masked. `GET` returns the last read and never touches the database.
|
|
222
|
+
|
|
223
|
+
The `sqlalchemy-statistics` panel (BootUI's `hibernate-statistics`; `GET {api}/sqlalchemy-statistics`, MCP
|
|
224
|
+
`get_sqlalchemy_statistics`) shows statement counts from SQL Trace's lifetime totals, the slowest statement and N+1
|
|
225
|
+
candidates per route. SQLAlchemy reports SQL statements, not ORM sessions or entities, so the Hibernate-only counters
|
|
226
|
+
(sessions, flushes, transactions, entity and collection counts) are `null`, each with a reason. It needs SQL Trace, and
|
|
227
|
+
reports `statistics.warnings` when SQL Trace recording is paused.
|
|
130
228
|
|
|
131
229
|
Other options are keyword arguments or environment variables, see [Settings](https://ffroliva.github.io/sharpit/settings/).
|
|
132
230
|
|
|
@@ -138,7 +236,10 @@ The full documentation is at **<https://ffroliva.github.io/sharpit/>**:
|
|
|
138
236
|
|
|
139
237
|
- [Activation](https://ffroliva.github.io/sharpit/activation/): when sharpit turns on, and why a plain `uvicorn app:app` gives 404
|
|
140
238
|
- [Panels](https://ffroliva.github.io/sharpit/panels/): what each panel shows
|
|
141
|
-
- [
|
|
239
|
+
- [Pytest plugin](https://ffroliva.github.io/sharpit/pytest-plugin/): CI gates for queries, N+1, exceptions, and advisors
|
|
240
|
+
- [Test report](https://ffroliva.github.io/sharpit/report/): the `sharpit-report/1` JSON schema and JUnit XML
|
|
241
|
+
- [SQL sources](https://ffroliva.github.io/sharpit/sql-sources/): tracing SQLAlchemy and raw `sqlite3`
|
|
242
|
+
- [MCP for AI agents](https://ffroliva.github.io/sharpit/mcp/): the read-only MCP endpoint and its tools
|
|
142
243
|
- [Settings](https://ffroliva.github.io/sharpit/settings/): every environment variable and `install()` keyword
|
|
143
244
|
- [Safety model](https://ffroliva.github.io/sharpit/safety/): local-only guard, tokens, masking, proxies and workers
|
|
144
245
|
- [How it works](https://ffroliva.github.io/sharpit/how-it-works/) and [Deviations from BootUI](https://ffroliva.github.io/sharpit/deviations/)
|
sharpit-0.4.0/README.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# sharpit
|
|
2
|
+
|
|
3
|
+
[](https://github.com/ffroliva/sharpit/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/ffroliva/sharpit/actions/workflows/release.yml)
|
|
5
|
+
[](https://pypi.org/project/sharpit/)
|
|
6
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
7
|
+
[](https://sonarcloud.io/component_measures?id=ffroliva_sharpit&metric=coverage&branch=main)
|
|
8
|
+
|
|
9
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
10
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
11
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
12
|
+
[](https://sonarcloud.io/component_measures?id=ffroliva_sharpit&metric=duplicated_lines_density&branch=main)
|
|
13
|
+
|
|
14
|
+
[](https://github.com/ffroliva/sharpit/blob/main/pyproject.toml)
|
|
15
|
+
[](https://github.com/ffroliva/sharpit/blob/main/LICENSE)
|
|
16
|
+
[](https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md)
|
|
17
|
+
[](https://github.com/astral-sh/ruff)
|
|
18
|
+
[](https://github.com/microsoft/pyright)
|
|
19
|
+
|
|
20
|
+
An embedded, local-only developer console and automated test gate for FastAPI apps.
|
|
21
|
+
|
|
22
|
+
## Gate CI on findings
|
|
23
|
+
|
|
24
|
+
sharpit turns runtime capture into automated test gates with `pytest --sharpit`. It tracks SQL
|
|
25
|
+
statements and observable exceptions per test, detects N+1 queries, checks query budgets, and runs
|
|
26
|
+
static analysis advisors. If a test exceeds its query budget, triggers an N+1 query, or swallows an
|
|
27
|
+
unhandled exception, the build fails. When capture cannot see enough to judge, the run status is
|
|
28
|
+
`unknown` and fails closed.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pytest --sharpit --sharpit-report=sharpit-report.json --sharpit-junit=sharpit-junit.xml
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
You no longer need `--sharpit-app` for a typical suite: sharpit picks the one FastAPI or Starlette app defined in the
|
|
35
|
+
project modules your tests already imported (it never imports a module to look). With none, several, or one without
|
|
36
|
+
routes, the REST API advisor is `SKIPPED` and a clean suite still passes; `--sharpit-require-app` makes that `unknown`
|
|
37
|
+
again, as in 0.3.0. The terminal `gate counts:` lists only findings that fail the gate; `--sharpit-verbose` (or `-vv`)
|
|
38
|
+
lists every one. The JSON report and JUnit file always hold every finding.
|
|
39
|
+
|
|
40
|
+
### Adopting on an existing suite
|
|
41
|
+
|
|
42
|
+
Start without breaking the build, then freeze what is already there:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pytest --sharpit --sharpit-report-only # report everything, fail on nothing but blindness
|
|
46
|
+
pytest --sharpit --sharpit-write-baseline=sharpit-baseline.json # after a complete run: record today's findings
|
|
47
|
+
pytest --sharpit --sharpit-baseline=sharpit-baseline.json # in CI: only new findings fail
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- **Report-only** (`--sharpit-report-only`, ini `sharpit_report_only = true`) runs every gate and advisor and writes the
|
|
51
|
+
report, but findings do not fail tests or the session. An unknown reason still exits 1 unless
|
|
52
|
+
`--sharpit-allow-unknown`: report-only relaxes findings, never blindness.
|
|
53
|
+
- **Baselines** match findings by fingerprint. A listed finding is `existing` and never fails, an unlisted one is `new`
|
|
54
|
+
and gates as usual, a listed one not seen is `fixed`. A count gate that grows past its baselined count is `new`.
|
|
55
|
+
Vulnerability findings are not baselined in 0.4.0, and INFO findings never fail.
|
|
56
|
+
- `--sharpit-write-baseline=PATH` is the only way a baseline is written. It refuses a partial run (`-k`, `-m`, node ids,
|
|
57
|
+
`--lf`, `--deselect`, `-x` stopping early, an interrupt) and a run with any unknown reason.
|
|
58
|
+
- A missing or malformed baseline never switches sharpit off: the session runs and the baseline becomes an unknown
|
|
59
|
+
reason, which fails the run. Own the baseline file in CODEOWNERS, or a PR can baseline its own findings.
|
|
60
|
+
|
|
61
|
+
### GitHub Action
|
|
62
|
+
|
|
63
|
+
The repository root is a composite action (`action.yml`) that runs pytest with sharpit and writes a findings summary to
|
|
64
|
+
the job summary. Pin it to a release tag:
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
- uses: ffroliva/sharpit@<release tag>
|
|
68
|
+
with:
|
|
69
|
+
pytest-args: "-q tests/"
|
|
70
|
+
baseline: sharpit-baseline.json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Inputs: `pytest-args` (split with Python shlex), `report-only` (default `"true"`: findings are reported, never fail the
|
|
74
|
+
build), `baseline`, `fail-on` (lowest severity that fails), `report-path` (default `sharpit-report.json`), `install`
|
|
75
|
+
(`pip` installs the pinned sharpit; `none` when your project already depends on it, in which case `python` must be
|
|
76
|
+
able to import sharpit) and `runner` (default `python -m pytest`, for example `uv run pytest`). Set `report-only: "false"`
|
|
77
|
+
to gate. The pytest exit code is never masked: the summary step runs `if: always()` and only warns if it fails. The
|
|
78
|
+
summary is rendered by `python -m sharpit.report summary <report.json>`. On Windows runners `runner` and `pytest-args`
|
|
79
|
+
are split in non-POSIX mode so backslashes in paths survive.
|
|
80
|
+
|
|
81
|
+
### Outside proof: gflow-cli
|
|
82
|
+
|
|
83
|
+
Run by sharpit's author on the 0.3.0 integration branch against gflow-cli (a public FastAPI daemon using raw `sqlite3`; see [sharpit's own report](docs/reports/2026-11-01-gflow-cli-sharpit.md)), sharpit ran across **5,662** tests (5 failed by sharpit gates):
|
|
84
|
+
- **0 unattributed SQL statements** across ~53k statements executed (27,997 attributed + 25,092 filtered);
|
|
85
|
+
- **6 N+1 findings**, of which 1 was a real defect, 2 were noise (filtered since 0.3.0), and 3 were expected polling;
|
|
86
|
+
- Proved out-of-code runtime observation without changing production code.
|
|
87
|
+
|
|
88
|
+
## 60 seconds
|
|
89
|
+
|
|
90
|
+
Install sharpit with the FastAPI host extra:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pip install "sharpit[fastapi]"
|
|
94
|
+
# or
|
|
95
|
+
uv add "sharpit[fastapi]"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Add one call to your FastAPI app:
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
from fastapi import FastAPI
|
|
102
|
+
import sharpit
|
|
103
|
+
|
|
104
|
+
app = FastAPI()
|
|
105
|
+
|
|
106
|
+
# Register your application middleware first, then mount sharpit:
|
|
107
|
+
sharpit.install(app) # mounts /sharpit and /sharpit/api
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Run tests with sharpit gate reporting:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pytest --sharpit --sharpit-report=sharpit-report.json
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Run it locally with a dev signal and open <http://127.0.0.1:8000/sharpit/>:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
fastapi dev app.py # or: uvicorn app:app --reload
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Overview
|
|
123
|
+
|
|
124
|
+
One call mounts a web console at `/sharpit` and a JSON API at `/sharpit/api` inside your own app,
|
|
125
|
+
so a running service becomes understandable in minutes: its configuration and where each value
|
|
126
|
+
came from, every route, the dependency providers, loggers you can retune live, and a vulnerability
|
|
127
|
+
scan of the installed packages.
|
|
128
|
+
|
|
129
|
+
sharpit is a Python/FastAPI port of [BootUI](https://github.com/jdubois/boot-ui) by Julien Dubois (Apache-2.0),
|
|
130
|
+
the Spring Boot developer console. It ports BootUI's design goals, JSON contract and test cases; the UI is new.
|
|
131
|
+
|
|
132
|
+

|
|
133
|
+
|
|
134
|
+
> **Status: alpha (0.4.0, FastAPI only).** Django and Flask are not supported. See [CHANGELOG.md](https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md).
|
|
135
|
+
|
|
136
|
+
## Installation and extras
|
|
137
|
+
|
|
138
|
+
Python 3.12+. Runtime dependencies are only `starlette>=0.44` and `packaging>=23`.
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
pip install "sharpit[fastapi]"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Optional extras:
|
|
145
|
+
|
|
146
|
+
| Extra | Adds | Why |
|
|
147
|
+
|---|---|---|
|
|
148
|
+
| `sharpit[fastapi]` | `fastapi>=0.115` | the supported host |
|
|
149
|
+
| `sharpit[settings]` | `pydantic-settings>=2.4` | the Config panel shows which source each value came from |
|
|
150
|
+
|
|
151
|
+
## Configuration and activation
|
|
152
|
+
|
|
153
|
+
Call `sharpit.install(app)` after adding your own middleware. Starlette builds middleware from the outside in, so
|
|
154
|
+
calling `install()` last ensures sharpit's capture middleware sits outside your application middleware. This lets sharpit
|
|
155
|
+
measure total request durations and record unhandled errors correctly.
|
|
156
|
+
|
|
157
|
+
Keyword arguments for `sharpit.install()`:
|
|
158
|
+
|
|
159
|
+
- `engines`: optional sequence of SQLAlchemy `Engine` or `AsyncEngine` instances to monitor in connection pools and
|
|
160
|
+
health checks (e.g. `engines=[engine]`). If omitted, engines are discovered automatically on first connection.
|
|
161
|
+
- `health_checks`: optional mapping of check names to zero-argument callables (e.g. `health_checks={"cache": ping_cache}`).
|
|
162
|
+
- `alembic_config`: optional path to `alembic.ini` (default `"alembic.ini"`).
|
|
163
|
+
- `settings`: optional pydantic-settings instance or sequence of instances to show configuration provenance.
|
|
164
|
+
- `models`: optional SQLAlchemy 2.0 declarative base, registry, or a list of them or of mapped classes, for the Data
|
|
165
|
+
panel (e.g. `models=Base`). sharpit never configures mappers or runs SQL to read them.
|
|
166
|
+
|
|
167
|
+
With a PostgreSQL engine, the PostgreSQL panel reads vital signs, sessions, statements, indexes, tables, vacuum,
|
|
168
|
+
replication and settings on an explicit `POST /sharpit/api/postgresql/read`: one read-only transaction with statement
|
|
169
|
+
and lock timeouts, a read budget and row limits, query text masked. `GET` returns the last read and never touches the database.
|
|
170
|
+
|
|
171
|
+
The `sqlalchemy-statistics` panel (BootUI's `hibernate-statistics`; `GET {api}/sqlalchemy-statistics`, MCP
|
|
172
|
+
`get_sqlalchemy_statistics`) shows statement counts from SQL Trace's lifetime totals, the slowest statement and N+1
|
|
173
|
+
candidates per route. SQLAlchemy reports SQL statements, not ORM sessions or entities, so the Hibernate-only counters
|
|
174
|
+
(sessions, flushes, transactions, entity and collection counts) are `null`, each with a reason. It needs SQL Trace, and
|
|
175
|
+
reports `statistics.warnings` when SQL Trace recording is paused.
|
|
176
|
+
|
|
177
|
+
Other options are keyword arguments or environment variables, see [Settings](https://ffroliva.github.io/sharpit/settings/).
|
|
178
|
+
|
|
179
|
+
If `/sharpit` answers 404, read [Activation](https://ffroliva.github.io/sharpit/activation/): sharpit stays off unless a dev signal turns it on.
|
|
180
|
+
|
|
181
|
+
## Documentation
|
|
182
|
+
|
|
183
|
+
The full documentation is at **<https://ffroliva.github.io/sharpit/>**:
|
|
184
|
+
|
|
185
|
+
- [Activation](https://ffroliva.github.io/sharpit/activation/): when sharpit turns on, and why a plain `uvicorn app:app` gives 404
|
|
186
|
+
- [Panels](https://ffroliva.github.io/sharpit/panels/): what each panel shows
|
|
187
|
+
- [Pytest plugin](https://ffroliva.github.io/sharpit/pytest-plugin/): CI gates for queries, N+1, exceptions, and advisors
|
|
188
|
+
- [Test report](https://ffroliva.github.io/sharpit/report/): the `sharpit-report/1` JSON schema and JUnit XML
|
|
189
|
+
- [SQL sources](https://ffroliva.github.io/sharpit/sql-sources/): tracing SQLAlchemy and raw `sqlite3`
|
|
190
|
+
- [MCP for AI agents](https://ffroliva.github.io/sharpit/mcp/): the read-only MCP endpoint and its tools
|
|
191
|
+
- [Settings](https://ffroliva.github.io/sharpit/settings/): every environment variable and `install()` keyword
|
|
192
|
+
- [Safety model](https://ffroliva.github.io/sharpit/safety/): local-only guard, tokens, masking, proxies and workers
|
|
193
|
+
- [How it works](https://ffroliva.github.io/sharpit/how-it-works/) and [Deviations from BootUI](https://ffroliva.github.io/sharpit/deviations/)
|
|
194
|
+
|
|
195
|
+
## License
|
|
196
|
+
|
|
197
|
+
Apache License 2.0. See [LICENSE](https://github.com/ffroliva/sharpit/blob/main/LICENSE) and [NOTICE](https://github.com/ffroliva/sharpit/blob/main/NOTICE). sharpit is derived from
|
|
198
|
+
[BootUI](https://github.com/jdubois/boot-ui), Copyright Julien Dubois.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
sharpit takes security and procurement hygiene seriously. As an embedded developer console and automated test gate, sharpit is designed to fail closed and keep application runtime and data local.
|
|
4
|
+
|
|
5
|
+
## Supported Versions
|
|
6
|
+
|
|
7
|
+
Security updates are provided only for the latest release on PyPI:
|
|
8
|
+
|
|
9
|
+
| Version | Supported | Notes |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Latest release on PyPI (0.4.x) | Yes | Verifiable support boundary |
|
|
12
|
+
| Prior versions | No | Unsupported |
|
|
13
|
+
|
|
14
|
+
## Reporting a Vulnerability
|
|
15
|
+
|
|
16
|
+
Please report suspected security vulnerabilities privately. **Do not post vulnerability details in public issues or discussions.**
|
|
17
|
+
|
|
18
|
+
- Once enabled on the repository, report privately via GitHub's "Report a vulnerability" button under the **Security** tab.
|
|
19
|
+
- Until private vulnerability reporting is enabled, please open a GitHub issue titled `"Security contact request"` containing **NO details**, and the maintainer will reply with a private channel to share details securely.
|
|
20
|
+
|
|
21
|
+
## Network Egress and Trust Boundaries
|
|
22
|
+
|
|
23
|
+
sharpit enforces strict safety invariants:
|
|
24
|
+
|
|
25
|
+
- **Local read surface**: HTTP GET routes (under `/sharpit` and `/sharpit/api`) and Model Context Protocol (MCP) read tools open no sockets.
|
|
26
|
+
- **Database panels and health checks**:
|
|
27
|
+
- The health check (POST) pings configured database engines and runs user health callables.
|
|
28
|
+
- Database panels run read-only SQL through the app's own engines.
|
|
29
|
+
- **Vulnerability scan network egress**: Outbound network requests occur only during an explicit vulnerability scan (POST), which sends installed package names and versions (up to 500) to OSV and CVE IDs to FIRST EPSS:
|
|
30
|
+
- The OSV client in `src/sharpit/engine/collectors/vulns/osv.py` queries OSV;
|
|
31
|
+
- The EPSS client in `src/sharpit/engine/collectors/vulns/epss.py` queries FIRST EPSS.
|
|
32
|
+
- Destinations are configurable via `SHARPIT_VULNERABILITIES_OSV_BASE_URI` and `SHARPIT_VULNERABILITIES_EPSS_BASE_URI`.
|
|
33
|
+
- Network vulnerability scans can be disabled via `SHARPIT_VULNERABILITIES_OSV_ENABLED=false` and `SHARPIT_VULNERABILITIES_EPSS_ENABLED=false`.
|
|
34
|
+
- **Fails closed**: If network requests to OSV or EPSS fail or time out, the scan reports the failure gracefully without compromising security or crashing the host application.
|
sharpit-0.4.0/action.yml
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
name: sharpit
|
|
2
|
+
description: Run pytest with sharpit (SQL and exception advisors) and publish a findings summary to the job summary.
|
|
3
|
+
inputs:
|
|
4
|
+
pytest-args:
|
|
5
|
+
description: Extra pytest arguments, split with Python shlex (quote values with spaces).
|
|
6
|
+
default: ""
|
|
7
|
+
report-only:
|
|
8
|
+
description: Report findings without failing the build ("true" or "false").
|
|
9
|
+
default: "true"
|
|
10
|
+
baseline:
|
|
11
|
+
description: Path of a sharpit-baseline/1 file; existing findings never fail the build.
|
|
12
|
+
default: ""
|
|
13
|
+
fail-on:
|
|
14
|
+
description: Lowest advisor severity that fails the build (CRITICAL, HIGH, MEDIUM, LOW, INFO).
|
|
15
|
+
default: ""
|
|
16
|
+
report-path:
|
|
17
|
+
description: Where the sharpit-report/1 JSON is written.
|
|
18
|
+
default: "sharpit-report.json"
|
|
19
|
+
install:
|
|
20
|
+
description: '"pip" installs the pinned sharpit; "none" when the project already depends on it.'
|
|
21
|
+
default: "pip"
|
|
22
|
+
runner:
|
|
23
|
+
description: Command that starts pytest, split with Python shlex (for example "uv run pytest").
|
|
24
|
+
default: "python -m pytest"
|
|
25
|
+
runs:
|
|
26
|
+
using: composite
|
|
27
|
+
steps:
|
|
28
|
+
- name: Install sharpit
|
|
29
|
+
shell: bash
|
|
30
|
+
env:
|
|
31
|
+
INSTALL: ${{ inputs.install }}
|
|
32
|
+
run: |
|
|
33
|
+
if [ "$INSTALL" = "pip" ]; then
|
|
34
|
+
python -m pip install "sharpit==0.4.0"
|
|
35
|
+
elif [ "$INSTALL" != "none" ]; then
|
|
36
|
+
echo "::error::install must be pip or none"
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
- name: Run pytest with sharpit
|
|
40
|
+
shell: bash
|
|
41
|
+
env:
|
|
42
|
+
RUNNER: ${{ inputs.runner }}
|
|
43
|
+
PYTEST_ARGS: ${{ inputs.pytest-args }}
|
|
44
|
+
REPORT_ONLY: ${{ inputs.report-only }}
|
|
45
|
+
BASELINE: ${{ inputs.baseline }}
|
|
46
|
+
FAIL_ON: ${{ inputs.fail-on }}
|
|
47
|
+
REPORT_PATH: ${{ inputs.report-path }}
|
|
48
|
+
run: |
|
|
49
|
+
rm -f "$REPORT_PATH"
|
|
50
|
+
python - <<'PY'
|
|
51
|
+
import os, shlex, subprocess, sys
|
|
52
|
+
report_only = os.environ["REPORT_ONLY"]
|
|
53
|
+
if report_only not in ("true", "false"):
|
|
54
|
+
print("::error::report-only must be true or false")
|
|
55
|
+
sys.exit(1)
|
|
56
|
+
def split(value):
|
|
57
|
+
if os.environ.get("RUNNER_OS") != "Windows":
|
|
58
|
+
return shlex.split(value)
|
|
59
|
+
# non-POSIX mode keeps backslashes in Windows paths; strip the quotes it leaves on each token
|
|
60
|
+
return [t[1:-1] if len(t) > 1 and t[0] == t[-1] and t[0] in "\"'" else t for t in shlex.split(value, posix=False)]
|
|
61
|
+
argv = split(os.environ["RUNNER"]) + split(os.environ["PYTEST_ARGS"])
|
|
62
|
+
argv += ["--sharpit", "--sharpit-report", os.environ["REPORT_PATH"]]
|
|
63
|
+
# false overrides a sharpit_report_only ini setting
|
|
64
|
+
argv += ["--sharpit-report-only"] if report_only == "true" else ["-o", "sharpit_report_only=false"]
|
|
65
|
+
for flag, name in (("--sharpit-baseline", "BASELINE"), ("--sharpit-fail-on", "FAIL_ON")):
|
|
66
|
+
if os.environ[name]:
|
|
67
|
+
argv += [flag, os.environ[name]]
|
|
68
|
+
sys.exit(subprocess.call(argv))
|
|
69
|
+
PY
|
|
70
|
+
- name: Render job summary
|
|
71
|
+
if: always()
|
|
72
|
+
shell: bash
|
|
73
|
+
env:
|
|
74
|
+
REPORT_PATH: ${{ inputs.report-path }}
|
|
75
|
+
run: |
|
|
76
|
+
if [ -f "$REPORT_PATH" ]; then
|
|
77
|
+
python -m sharpit.report summary "$REPORT_PATH" >> "$GITHUB_STEP_SUMMARY" || echo "::warning::sharpit summary failed"
|
|
78
|
+
else
|
|
79
|
+
echo "::warning::sharpit wrote no report"
|
|
80
|
+
fi
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|---|---|
|
|
5
5
|
| [../website/docs/how-it-works.md](../website/docs/how-it-works.md) | How sharpit works; published with the rest of the user docs at https://ffroliva.github.io/sharpit/ |
|
|
6
6
|
| [development/workflow.md](development/workflow.md) | How a change goes from idea to release with the `/sharpit:*` skills |
|
|
7
|
+
| [development/ci.md](development/ci.md) | Every CI job, what it guards, and the exact command to run it locally |
|
|
8
|
+
| [development/overhead-budgets.md](development/overhead-budgets.md) | How the overhead budget tests measure and how to read a failure |
|
|
7
9
|
| [reference/BOOTUI-CONTRACT-MVP.md](reference/BOOTUI-CONTRACT-MVP.md) | The BootUI HTTP contract the MVP must match: DTOs, error strings, activation reasons |
|
|
8
10
|
| [reference/BOOTUI-PYTHON-MAPPING.md](reference/BOOTUI-PYTHON-MAPPING.md) | How BootUI's Spring concepts map to Python/FastAPI |
|
|
9
11
|
| [superpowers/specs/2026-10-30-sharpit-mvp-design.md](superpowers/specs/2026-10-30-sharpit-mvp-design.md) | MVP design spec; §14 deviation log, §15 coordinator's calls for the owner |
|