hawk 2.0.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.
- hawk-2.0.0/.cursor/rules/api-patterns.mdc +13 -0
- hawk-2.0.0/.cursor/rules/architecture.mdc +6 -0
- hawk-2.0.0/.cursor/rules/cli-structure.mdc +31 -0
- hawk-2.0.0/.cursor/rules/dev-workflow.mdc +6 -0
- hawk-2.0.0/.cursor/rules/kubernetes-helm.mdc +11 -0
- hawk-2.0.0/.cursor/rules/python-standards.mdc +42 -0
- hawk-2.0.0/.cursor/rules/testing-patterns.mdc +57 -0
- hawk-2.0.0/.dockerignore +38 -0
- hawk-2.0.0/.editorconfig +20 -0
- hawk-2.0.0/.env.example +77 -0
- hawk-2.0.0/.gitattributes +1 -0
- hawk-2.0.0/.github/workflows/weekly-release.yaml +122 -0
- hawk-2.0.0/.gitignore +344 -0
- hawk-2.0.0/.mcp.json +22 -0
- hawk-2.0.0/.mentat/precommit.sh +5 -0
- hawk-2.0.0/.mentat/setup.sh +4 -0
- hawk-2.0.0/.public-exclude +4 -0
- hawk-2.0.0/.python-version +1 -0
- hawk-2.0.0/CHANGELOG.md +187 -0
- hawk-2.0.0/CLAUDE.md +652 -0
- hawk-2.0.0/Dockerfile +167 -0
- hawk-2.0.0/PKG-INFO +157 -0
- hawk-2.0.0/README.md +34 -0
- hawk-2.0.0/demo/docker_in_sandbox_task/README.md +4 -0
- hawk-2.0.0/demo/docker_in_sandbox_task/docker_in_sandbox_task/__init__.py +0 -0
- hawk-2.0.0/demo/docker_in_sandbox_task/docker_in_sandbox_task/_registry.py +3 -0
- hawk-2.0.0/demo/docker_in_sandbox_task/docker_in_sandbox_task/docker-enabled.sleep.values.yaml +12 -0
- hawk-2.0.0/demo/docker_in_sandbox_task/docker_in_sandbox_task/docker-enabled.values.yaml +12 -0
- hawk-2.0.0/demo/docker_in_sandbox_task/docker_in_sandbox_task/task.py +74 -0
- hawk-2.0.0/demo/docker_in_sandbox_task/pyproject.toml +24 -0
- hawk-2.0.0/docker/warehouse-init.sql +5 -0
- hawk-2.0.0/docker-compose.debug.yaml +13 -0
- hawk-2.0.0/docker-compose.yaml +215 -0
- hawk-2.0.0/docs/Architecture.md +217 -0
- hawk-2.0.0/docs/debugging-stuck-evals.md +358 -0
- hawk-2.0.0/docs/solutions/smoke-test-failures/investigating-batch-import-failures.md +153 -0
- hawk-2.0.0/docs/solutions/test-failures/mock-scoping.md +97 -0
- hawk-2.0.0/docs/superpowers/plans/2026-05-04-adaptive-connections.md +606 -0
- hawk-2.0.0/docs/superpowers/specs/2026-05-04-adaptive-connections-design.md +129 -0
- hawk-2.0.0/examples/docker-in-sandbox.eval-set.yaml +19 -0
- hawk-2.0.0/examples/human-baseline.eval-set.yaml +22 -0
- hawk-2.0.0/examples/simple-with-aws-secret.eval-set.yaml +21 -0
- hawk-2.0.0/examples/simple-with-secrets.eval-set.yaml +21 -0
- hawk-2.0.0/examples/simple.eval-set.yaml +15 -0
- hawk-2.0.0/examples/simple.scan.yaml +22 -0
- hawk-2.0.0/hawk/__init__.py +29 -0
- hawk-2.0.0/hawk/__main__.py +4 -0
- hawk-2.0.0/hawk/api/EvalSetConfig.schema.json +1216 -0
- hawk-2.0.0/hawk/api/ScanConfig.schema.json +1023 -0
- hawk-2.0.0/hawk/api/__init__.py +0 -0
- hawk-2.0.0/hawk/api/auth/__init__.py +0 -0
- hawk-2.0.0/hawk/api/auth/access_token.py +159 -0
- hawk-2.0.0/hawk/api/auth/job_auth.py +71 -0
- hawk-2.0.0/hawk/api/auth/middleman_client.py +90 -0
- hawk-2.0.0/hawk/api/auth/permission_checker.py +89 -0
- hawk-2.0.0/hawk/api/auth/read_only.py +82 -0
- hawk-2.0.0/hawk/api/auth/s3_files.py +177 -0
- hawk-2.0.0/hawk/api/auth_router.py +365 -0
- hawk-2.0.0/hawk/api/cors_middleware.py +32 -0
- hawk-2.0.0/hawk/api/datadog.py +55 -0
- hawk-2.0.0/hawk/api/datadog_monitors.py +134 -0
- hawk-2.0.0/hawk/api/eval_log_server.py +63 -0
- hawk-2.0.0/hawk/api/eval_set_server.py +501 -0
- hawk-2.0.0/hawk/api/health.py +180 -0
- hawk-2.0.0/hawk/api/helm_chart/Chart.yaml +5 -0
- hawk-2.0.0/hawk/api/helm_chart/templates/config_map.yaml +34 -0
- hawk-2.0.0/hawk/api/helm_chart/templates/job.yaml +201 -0
- hawk-2.0.0/hawk/api/helm_chart/templates/namespace.yaml +37 -0
- hawk-2.0.0/hawk/api/helm_chart/templates/network_policy.yaml +60 -0
- hawk-2.0.0/hawk/api/helm_chart/templates/secret.yaml +22 -0
- hawk-2.0.0/hawk/api/helm_chart/templates/service_account.yaml +42 -0
- hawk-2.0.0/hawk/api/human_eval_server.py +379 -0
- hawk-2.0.0/hawk/api/human_server.py +304 -0
- hawk-2.0.0/hawk/api/import_server.py +564 -0
- hawk-2.0.0/hawk/api/jumphost.py +156 -0
- hawk-2.0.0/hawk/api/meta_server.py +1589 -0
- hawk-2.0.0/hawk/api/monitoring_server.py +1109 -0
- hawk-2.0.0/hawk/api/otel.py +30 -0
- hawk-2.0.0/hawk/api/presigned_urls.py +29 -0
- hawk-2.0.0/hawk/api/problem.py +177 -0
- hawk-2.0.0/hawk/api/run.py +416 -0
- hawk-2.0.0/hawk/api/sample_content_router.py +326 -0
- hawk-2.0.0/hawk/api/sample_edit_router.py +332 -0
- hawk-2.0.0/hawk/api/scan_server.py +571 -0
- hawk-2.0.0/hawk/api/scan_view_server.py +420 -0
- hawk-2.0.0/hawk/api/server.py +306 -0
- hawk-2.0.0/hawk/api/server_policies.py +70 -0
- hawk-2.0.0/hawk/api/settings.py +234 -0
- hawk-2.0.0/hawk/api/state.py +255 -0
- hawk-2.0.0/hawk/api/timeline.py +320 -0
- hawk-2.0.0/hawk/api/util/aiohttp_to_starlette.py +46 -0
- hawk-2.0.0/hawk/api/util/namespace.py +28 -0
- hawk-2.0.0/hawk/api/util/validation.py +315 -0
- hawk-2.0.0/hawk/api/yaml_safety.py +71 -0
- hawk-2.0.0/hawk/cli/__init__.py +0 -0
- hawk-2.0.0/hawk/cli/cli.py +2206 -0
- hawk-2.0.0/hawk/cli/config.py +264 -0
- hawk-2.0.0/hawk/cli/delete.py +22 -0
- hawk-2.0.0/hawk/cli/download.py +113 -0
- hawk-2.0.0/hawk/cli/download_artifacts.py +242 -0
- hawk-2.0.0/hawk/cli/edit_samples.py +32 -0
- hawk-2.0.0/hawk/cli/eval_set.py +57 -0
- hawk-2.0.0/hawk/cli/human.py +89 -0
- hawk-2.0.0/hawk/cli/human_eval.py +191 -0
- hawk-2.0.0/hawk/cli/import_cmd.py +182 -0
- hawk-2.0.0/hawk/cli/list.py +161 -0
- hawk-2.0.0/hawk/cli/local.py +327 -0
- hawk-2.0.0/hawk/cli/login.py +87 -0
- hawk-2.0.0/hawk/cli/middleman.py +93 -0
- hawk-2.0.0/hawk/cli/models.py +56 -0
- hawk-2.0.0/hawk/cli/monitoring.py +367 -0
- hawk-2.0.0/hawk/cli/scan.py +98 -0
- hawk-2.0.0/hawk/cli/seed/__init__.py +0 -0
- hawk-2.0.0/hawk/cli/seed/constants.py +296 -0
- hawk-2.0.0/hawk/cli/seed/eval_log.py +423 -0
- hawk-2.0.0/hawk/cli/seed/seeder.py +165 -0
- hawk-2.0.0/hawk/cli/stacktrace.py +66 -0
- hawk-2.0.0/hawk/cli/stop.py +32 -0
- hawk-2.0.0/hawk/cli/tokens.py +62 -0
- hawk-2.0.0/hawk/cli/trace.py +424 -0
- hawk-2.0.0/hawk/cli/transcript.py +501 -0
- hawk-2.0.0/hawk/cli/util/api.py +544 -0
- hawk-2.0.0/hawk/cli/util/auth.py +492 -0
- hawk-2.0.0/hawk/cli/util/model.py +200 -0
- hawk-2.0.0/hawk/cli/util/responses.py +36 -0
- hawk-2.0.0/hawk/cli/util/secrets.py +164 -0
- hawk-2.0.0/hawk/cli/util/table.py +48 -0
- hawk-2.0.0/hawk/cli/util/trace.py +30 -0
- hawk-2.0.0/hawk/cli/util/types.py +129 -0
- hawk-2.0.0/hawk/cli/util/version_check.py +96 -0
- hawk-2.0.0/hawk/cli/watch.py +265 -0
- hawk-2.0.0/hawk/core/__init__.py +0 -0
- hawk-2.0.0/hawk/core/auth/__init__.py +5 -0
- hawk-2.0.0/hawk/core/auth/auth_context.py +17 -0
- hawk-2.0.0/hawk/core/auth/jwt_validator.py +148 -0
- hawk-2.0.0/hawk/core/auth/model_file.py +57 -0
- hawk-2.0.0/hawk/core/auth/permissions.py +111 -0
- hawk-2.0.0/hawk/core/aws_secret_arns.py +25 -0
- hawk-2.0.0/hawk/core/constants.py +9 -0
- hawk-2.0.0/hawk/core/db/__init__.py +0 -0
- hawk-2.0.0/hawk/core/db/alembic/env.py +83 -0
- hawk-2.0.0/hawk/core/db/alembic/script.py.mako +26 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/0844cd8afa68_score_unique.py +31 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/0a15eda2d9f5_token_counts_input.py +78 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/1bec8cf5d1cf_add_cost_limit_tracking.py +30 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/20260517_add_sample_attachment.py +106 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/29d00d0f0dc2_add_label_to_scanner_result_unique_.py +44 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/40285195f664_merge_heads.py +23 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/549e90e5525c_add_sample_event_table.py +548 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/5d72524d723a_init.py +374 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/65dbc6ab948e_merge_branch_anchor_events_with_human_.py +23 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/6c0a6ce96105_add_sample_started_completed_timestamps.py +32 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/70562d043fe1_add_job_table.py +110 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/7161087c5d94_cascade_deletes_on_middleman_model_.py +89 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/73b04dca7c10_merge_heads_cascade_deletes_enable_rls.py +23 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/77cdf99dcd0d_add_pg_trgm_indexes.py +60 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/7f3caddc67ed_add_branch_and_anchor_event_columns.py +34 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/86cfe97fc6d6_grant_rls_function_execute.py +78 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/88abdab61a5d_sample_last_imported.py +48 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/8b4908438916_merge_cost_limit_tracking_and_human_.py +23 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/8c6950acaca1_merge_migration_heads.py +23 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/9236fa4b5bb2_eval_set_id.py +53 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/9a8a68ffa612_add_sample_invalidation_fields.py +59 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/a1b2c3d4e5f6_rename_sample_ids.py +39 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/a1b2c3d4e5f7_add_model_to_scan.py +55 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/a1b2c3d4e5f9_memoize_rls_access_checks.py +342 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/a2b3c4d5e6f7_add_sample_id_btree_index.py +33 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/a3b4c5d6e7f8_add_fulltext_search_tsv.py +151 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/a7b8c9d0e1f2_scan_model_groups_unresolved_sentinel.py +95 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/a7c9d2e4f6b8_add_model_roles_tables.py +73 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/b2c3d4e5f6a0_revert_rls_memoization.py +276 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/b2c3d4e5f6a8_add_sample_search_text.py +80 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/b4c5d6e7f8a9_cap_search_tsv_jsonb_columns.py +57 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/c1d2e3f4a5b6_add_model_group_mapping.py +158 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/c3d4e5f6a7b9_token_limit_bigint.py +50 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/c4d5e6f7a8b9_denormalize_model_groups.py +223 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/c5d6e7f8a9b0_add_sample_search_indexes.py +92 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/c8b3a2e1f4d5_add_completed_at_eval_pk_index.py +34 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/c8d1e2f3a4b5_job_type_enum_to_hyphen.py +32 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/ccfec570758e_merge_heads.py +23 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/cd456ad85d24_scored_at.py +23 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/d1e2f3a4b5c6_add_parallel_query_indexes.py +55 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/d2e3f4a5b6c7_add_rls_infrastructure.py +350 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/d5e6f7a8b9c0_add_gin_index_on_eval_model_groups.py +29 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/d6e7f8a9b0c1_search_all_websearch_tsquery.py +47 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/d9e0f1a2b3c4_merge_unresolved_sentinel_and_completed_at_index.py +23 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/e2f3a4b5c6d7_add_score_scored_at.py +33 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/e3f4a5b6c7d8_enable_rls.py +44 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/e6f7a8b9c0d1_denormalize_scan_model_groups.py +200 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/e7f8a9b0c1d2_search_all_recency_sort.py +62 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/e9a523a87aeb_add_human_table.py +50 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/e9f1a2b3c4d5_add_model_role_type.py +36 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/ecf5fbecb879_add_human_eval_assignment_table.py +77 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/f3a4b5c6d7e8_add_score_model_usage.py +37 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/f8a9b0c1d2e3_search_all_scope_pushdown.py +54 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/fb819443bf37_rm_is_complete.py +39 -0
- hawk-2.0.0/hawk/core/db/alembic/versions/fdee9bee9bf8_scans.py +251 -0
- hawk-2.0.0/hawk/core/db/backfill_search_tsv.py +177 -0
- hawk-2.0.0/hawk/core/db/connection.py +231 -0
- hawk-2.0.0/hawk/core/db/functions.py +1135 -0
- hawk-2.0.0/hawk/core/db/job_writes.py +60 -0
- hawk-2.0.0/hawk/core/db/models.py +1431 -0
- hawk-2.0.0/hawk/core/db/parallel.py +121 -0
- hawk-2.0.0/hawk/core/db/serialization.py +73 -0
- hawk-2.0.0/hawk/core/db/upsert.py +99 -0
- hawk-2.0.0/hawk/core/dependencies.py +184 -0
- hawk-2.0.0/hawk/core/envsubst.py +51 -0
- hawk-2.0.0/hawk/core/eval_header.py +95 -0
- hawk-2.0.0/hawk/core/exceptions.py +52 -0
- hawk-2.0.0/hawk/core/importer/__init__.py +0 -0
- hawk-2.0.0/hawk/core/importer/eval/__init__.py +1 -0
- hawk-2.0.0/hawk/core/importer/eval/attachment_resolver.py +41 -0
- hawk-2.0.0/hawk/core/importer/eval/converter.py +926 -0
- hawk-2.0.0/hawk/core/importer/eval/externalization.py +144 -0
- hawk-2.0.0/hawk/core/importer/eval/importer.py +145 -0
- hawk-2.0.0/hawk/core/importer/eval/models.py +23 -0
- hawk-2.0.0/hawk/core/importer/eval/records.py +288 -0
- hawk-2.0.0/hawk/core/importer/eval/utils.py +101 -0
- hawk-2.0.0/hawk/core/importer/eval/writer/__init__.py +4 -0
- hawk-2.0.0/hawk/core/importer/eval/writer/postgres.py +824 -0
- hawk-2.0.0/hawk/core/importer/eval/writers.py +141 -0
- hawk-2.0.0/hawk/core/importer/scan/__init__.py +0 -0
- hawk-2.0.0/hawk/core/importer/scan/importer.py +96 -0
- hawk-2.0.0/hawk/core/importer/scan/writer/__init__.py +6 -0
- hawk-2.0.0/hawk/core/importer/scan/writer/postgres.py +362 -0
- hawk-2.0.0/hawk/core/importer/writer.py +64 -0
- hawk-2.0.0/hawk/core/logging.py +86 -0
- hawk-2.0.0/hawk/core/model_access.py +25 -0
- hawk-2.0.0/hawk/core/monitoring/__init__.py +13 -0
- hawk-2.0.0/hawk/core/monitoring/base.py +115 -0
- hawk-2.0.0/hawk/core/monitoring/eval_status.py +447 -0
- hawk-2.0.0/hawk/core/monitoring/kubernetes.py +1057 -0
- hawk-2.0.0/hawk/core/providers.py +369 -0
- hawk-2.0.0/hawk/core/run_in_venv.py +45 -0
- hawk-2.0.0/hawk/core/sanitize.py +148 -0
- hawk-2.0.0/hawk/core/scan_export.py +118 -0
- hawk-2.0.0/hawk/core/search/__init__.py +25 -0
- hawk-2.0.0/hawk/core/search/backend.py +36 -0
- hawk-2.0.0/hawk/core/search/postgres.py +623 -0
- hawk-2.0.0/hawk/core/search/service.py +41 -0
- hawk-2.0.0/hawk/core/search/types.py +129 -0
- hawk-2.0.0/hawk/core/shell.py +147 -0
- hawk-2.0.0/hawk/core/sse.py +64 -0
- hawk-2.0.0/hawk/core/tracing.py +297 -0
- hawk-2.0.0/hawk/core/types/__init__.py +185 -0
- hawk-2.0.0/hawk/core/types/__main__.py +38 -0
- hawk-2.0.0/hawk/core/types/artifacts.py +56 -0
- hawk-2.0.0/hawk/core/types/base.py +426 -0
- hawk-2.0.0/hawk/core/types/client_config.py +33 -0
- hawk-2.0.0/hawk/core/types/evals.py +392 -0
- hawk-2.0.0/hawk/core/types/monitoring.py +326 -0
- hawk-2.0.0/hawk/core/types/sample_edit.py +118 -0
- hawk-2.0.0/hawk/core/types/scans.py +287 -0
- hawk-2.0.0/hawk/core/version.py +110 -0
- hawk-2.0.0/hawk/e2e/__init__.py +0 -0
- hawk-2.0.0/hawk/e2e/task.py +25 -0
- hawk-2.0.0/hawk/janitor/__init__.py +0 -0
- hawk-2.0.0/hawk/janitor/__main__.py +233 -0
- hawk-2.0.0/hawk/py.typed +0 -0
- hawk-2.0.0/hawk/runner/__init__.py +0 -0
- hawk-2.0.0/hawk/runner/common.py +197 -0
- hawk-2.0.0/hawk/runner/credential_helper.py +407 -0
- hawk-2.0.0/hawk/runner/datadog_dashboard.json +225 -0
- hawk-2.0.0/hawk/runner/datadog_metrics.py +123 -0
- hawk-2.0.0/hawk/runner/entrypoint.py +267 -0
- hawk-2.0.0/hawk/runner/memory_monitor.py +635 -0
- hawk-2.0.0/hawk/runner/oauth_errors.py +31 -0
- hawk-2.0.0/hawk/runner/observability_headers.py +100 -0
- hawk-2.0.0/hawk/runner/oom_diagnostics.py +531 -0
- hawk-2.0.0/hawk/runner/otel_tracing.py +694 -0
- hawk-2.0.0/hawk/runner/process_tree.py +119 -0
- hawk-2.0.0/hawk/runner/ptrace.py +65 -0
- hawk-2.0.0/hawk/runner/refresh_token.py +204 -0
- hawk-2.0.0/hawk/runner/refresh_token_override.py +33 -0
- hawk-2.0.0/hawk/runner/run_eval_set.py +975 -0
- hawk-2.0.0/hawk/runner/run_scan.py +404 -0
- hawk-2.0.0/hawk/runner/run_scan_resume.py +100 -0
- hawk-2.0.0/hawk/runner/secrets.py +241 -0
- hawk-2.0.0/hawk/runner/set_memory_high.py +108 -0
- hawk-2.0.0/hawk/runner/stop_monitor.py +321 -0
- hawk-2.0.0/hawk/runner/stuck_eval_monitor.py +222 -0
- hawk-2.0.0/hawk/tools/__init__.py +0 -0
- hawk-2.0.0/hawk/tools/sync_models.py +170 -0
- hawk-2.0.0/pyproject.toml +224 -0
- hawk-2.0.0/scripts/runner/dummy/Dockerfile +9 -0
- hawk-2.0.0/scripts/runner/dummy/entrypoint.sh +17 -0
- hawk-2.0.0/services/modules/docker_lambda/Dockerfile +70 -0
- hawk-2.0.0/services/modules/eval_log_importer/Dockerfile +82 -0
- hawk-2.0.0/services/modules/eval_log_importer/eval_log_importer/__init__.py +0 -0
- hawk-2.0.0/services/modules/eval_log_importer/eval_log_importer/__main__.py +295 -0
- hawk-2.0.0/services/modules/eval_log_importer/pyproject.toml +40 -0
- hawk-2.0.0/services/modules/eval_log_importer/tests/__init__.py +0 -0
- hawk-2.0.0/services/modules/eval_log_importer/tests/test_main.py +494 -0
- hawk-2.0.0/services/modules/eval_log_importer/uv.lock +2477 -0
- hawk-2.0.0/services/modules/eval_log_reader/README.md +0 -0
- hawk-2.0.0/services/modules/eval_log_reader/eval_log_reader/__init__.py +0 -0
- hawk-2.0.0/services/modules/eval_log_reader/eval_log_reader/index.py +424 -0
- hawk-2.0.0/services/modules/eval_log_reader/pyproject.toml +46 -0
- hawk-2.0.0/services/modules/eval_log_reader/tests/test_eval_log_reader.py +991 -0
- hawk-2.0.0/services/modules/eval_log_reader/uv.lock +732 -0
- hawk-2.0.0/services/modules/job_status_updated/job_status_updated/__init__.py +0 -0
- hawk-2.0.0/services/modules/job_status_updated/job_status_updated/aws_clients.py +63 -0
- hawk-2.0.0/services/modules/job_status_updated/job_status_updated/index.py +85 -0
- hawk-2.0.0/services/modules/job_status_updated/job_status_updated/models.py +15 -0
- hawk-2.0.0/services/modules/job_status_updated/job_status_updated/processors/__init__.py +0 -0
- hawk-2.0.0/services/modules/job_status_updated/job_status_updated/processors/common.py +48 -0
- hawk-2.0.0/services/modules/job_status_updated/job_status_updated/processors/eval.py +319 -0
- hawk-2.0.0/services/modules/job_status_updated/job_status_updated/processors/scan.py +207 -0
- hawk-2.0.0/services/modules/job_status_updated/pyproject.toml +51 -0
- hawk-2.0.0/services/modules/job_status_updated/tests/__init__.py +0 -0
- hawk-2.0.0/services/modules/job_status_updated/tests/conftest.py +73 -0
- hawk-2.0.0/services/modules/job_status_updated/tests/test_common.py +60 -0
- hawk-2.0.0/services/modules/job_status_updated/tests/test_eval_processor.py +683 -0
- hawk-2.0.0/services/modules/job_status_updated/tests/test_routing.py +115 -0
- hawk-2.0.0/services/modules/job_status_updated/tests/test_scan_processor.py +430 -0
- hawk-2.0.0/services/modules/job_status_updated/uv.lock +2555 -0
- hawk-2.0.0/services/modules/sample_editor/Dockerfile +80 -0
- hawk-2.0.0/services/modules/sample_editor/pyproject.toml +48 -0
- hawk-2.0.0/services/modules/sample_editor/sample_editor/__init__.py +0 -0
- hawk-2.0.0/services/modules/sample_editor/sample_editor/__main__.py +138 -0
- hawk-2.0.0/services/modules/sample_editor/sample_editor/edit_sample.py +242 -0
- hawk-2.0.0/services/modules/sample_editor/sample_editor/s3_conditional.py +151 -0
- hawk-2.0.0/services/modules/sample_editor/tests/__init__.py +0 -0
- hawk-2.0.0/services/modules/sample_editor/tests/conftest.py +120 -0
- hawk-2.0.0/services/modules/sample_editor/tests/test_edit_sample.py +412 -0
- hawk-2.0.0/services/modules/sample_editor/tests/test_main.py +154 -0
- hawk-2.0.0/services/modules/sample_editor/tests/test_s3_conditional.py +169 -0
- hawk-2.0.0/services/modules/sample_editor/uv.lock +2399 -0
- hawk-2.0.0/services/modules/scan_importer/pyproject.toml +41 -0
- hawk-2.0.0/services/modules/scan_importer/scan_importer/index.py +121 -0
- hawk-2.0.0/services/modules/scan_importer/tests/conftest.py +7 -0
- hawk-2.0.0/services/modules/scan_importer/tests/test_index.py +168 -0
- hawk-2.0.0/services/modules/scan_importer/uv.lock +2778 -0
- hawk-2.0.0/services/modules/token_broker/pyproject.toml +51 -0
- hawk-2.0.0/services/modules/token_broker/tests/__init__.py +0 -0
- hawk-2.0.0/services/modules/token_broker/tests/conftest.py +29 -0
- hawk-2.0.0/services/modules/token_broker/tests/test_handler.py +104 -0
- hawk-2.0.0/services/modules/token_broker/tests/test_models.py +81 -0
- hawk-2.0.0/services/modules/token_broker/tests/test_policy.py +193 -0
- hawk-2.0.0/services/modules/token_broker/token_broker/__init__.py +0 -0
- hawk-2.0.0/services/modules/token_broker/token_broker/index.py +561 -0
- hawk-2.0.0/services/modules/token_broker/token_broker/policy.py +107 -0
- hawk-2.0.0/services/modules/token_broker/token_broker/types.py +68 -0
- hawk-2.0.0/services/modules/token_broker/uv.lock +1585 -0
- hawk-2.0.0/services/modules/viewer/Dockerfile +30 -0
- hawk-2.0.0/services/modules/viewer/nginx.conf +51 -0
- hawk-2.0.0/tests/CLAUDE.md +24 -0
- hawk-2.0.0/tests/README.md +1 -0
- hawk-2.0.0/tests/__init__.py +0 -0
- hawk-2.0.0/tests/api/__init__.py +0 -0
- hawk-2.0.0/tests/api/auth/__init__.py +0 -0
- hawk-2.0.0/tests/api/auth/test_access_token.py +369 -0
- hawk-2.0.0/tests/api/auth/test_auth.py +34 -0
- hawk-2.0.0/tests/api/auth/test_eval_log_permission_checker.py +264 -0
- hawk-2.0.0/tests/api/auth/test_job_auth.py +128 -0
- hawk-2.0.0/tests/api/auth/test_permissions.py +240 -0
- hawk-2.0.0/tests/api/auth/test_read_only.py +187 -0
- hawk-2.0.0/tests/api/auth/test_s3_files.py +241 -0
- hawk-2.0.0/tests/api/conftest.py +634 -0
- hawk-2.0.0/tests/api/test_access_logging.py +129 -0
- hawk-2.0.0/tests/api/test_auth_router.py +434 -0
- hawk-2.0.0/tests/api/test_aws_secret_arns.py +65 -0
- hawk-2.0.0/tests/api/test_cors.py +298 -0
- hawk-2.0.0/tests/api/test_create_eval_set.py +999 -0
- hawk-2.0.0/tests/api/test_create_scan.py +834 -0
- hawk-2.0.0/tests/api/test_datadog_monitors.py +157 -0
- hawk-2.0.0/tests/api/test_delete_eval_set.py +424 -0
- hawk-2.0.0/tests/api/test_delete_scan_run.py +171 -0
- hawk-2.0.0/tests/api/test_eval_log_server.py +63 -0
- hawk-2.0.0/tests/api/test_eval_set_config_endpoint.py +137 -0
- hawk-2.0.0/tests/api/test_eval_set_secrets_validation.py +496 -0
- hawk-2.0.0/tests/api/test_eval_sets_endpoint.py +217 -0
- hawk-2.0.0/tests/api/test_evals_endpoint.py +242 -0
- hawk-2.0.0/tests/api/test_health.py +228 -0
- hawk-2.0.0/tests/api/test_health_endpoints.py +22 -0
- hawk-2.0.0/tests/api/test_human_eval_server.py +1110 -0
- hawk-2.0.0/tests/api/test_human_server.py +572 -0
- hawk-2.0.0/tests/api/test_import_server.py +587 -0
- hawk-2.0.0/tests/api/test_jobs_endpoint.py +271 -0
- hawk-2.0.0/tests/api/test_jumphost.py +244 -0
- hawk-2.0.0/tests/api/test_meta_server_queries.py +794 -0
- hawk-2.0.0/tests/api/test_monitoring_server.py +2392 -0
- hawk-2.0.0/tests/api/test_otel_tracing.py +225 -0
- hawk-2.0.0/tests/api/test_presigned_urls.py +49 -0
- hawk-2.0.0/tests/api/test_run.py +65 -0
- hawk-2.0.0/tests/api/test_run_job_secrets.py +310 -0
- hawk-2.0.0/tests/api/test_run_memory_high.py +32 -0
- hawk-2.0.0/tests/api/test_sample_content_router.py +568 -0
- hawk-2.0.0/tests/api/test_sample_edit_router.py +754 -0
- hawk-2.0.0/tests/api/test_sample_meta.py +125 -0
- hawk-2.0.0/tests/api/test_sample_scores.py +169 -0
- hawk-2.0.0/tests/api/test_samples_endpoint.py +1328 -0
- hawk-2.0.0/tests/api/test_scan_export.py +198 -0
- hawk-2.0.0/tests/api/test_scan_secrets_validation.py +142 -0
- hawk-2.0.0/tests/api/test_scan_server_unit.py +168 -0
- hawk-2.0.0/tests/api/test_scan_subcommands.py +195 -0
- hawk-2.0.0/tests/api/test_scan_view_server.py +836 -0
- hawk-2.0.0/tests/api/test_scans_endpoint.py +406 -0
- hawk-2.0.0/tests/api/test_schema_endpoint.py +65 -0
- hawk-2.0.0/tests/api/test_search_sort_contract.py +39 -0
- hawk-2.0.0/tests/api/test_server_policies.py +63 -0
- hawk-2.0.0/tests/api/test_settings.py +87 -0
- hawk-2.0.0/tests/api/test_stop_eval_set.py +188 -0
- hawk-2.0.0/tests/api/test_timeline.py +513 -0
- hawk-2.0.0/tests/api/test_validation.py +271 -0
- hawk-2.0.0/tests/api/test_version_endpoint.py +25 -0
- hawk-2.0.0/tests/api/test_yaml_safety.py +106 -0
- hawk-2.0.0/tests/api/util/__init__.py +0 -0
- hawk-2.0.0/tests/api/util/test_aiohttp_to_starlette.py +68 -0
- hawk-2.0.0/tests/api/util/test_namespace.py +40 -0
- hawk-2.0.0/tests/cli/__init__.py +0 -0
- hawk-2.0.0/tests/cli/conftest.py +18 -0
- hawk-2.0.0/tests/cli/seed/__init__.py +0 -0
- hawk-2.0.0/tests/cli/seed/test_factories.py +74 -0
- hawk-2.0.0/tests/cli/test_cli.py +914 -0
- hawk-2.0.0/tests/cli/test_config.py +741 -0
- hawk-2.0.0/tests/cli/test_delete.py +33 -0
- hawk-2.0.0/tests/cli/test_download.py +221 -0
- hawk-2.0.0/tests/cli/test_download_artifacts.py +712 -0
- hawk-2.0.0/tests/cli/test_edit_samples.py +292 -0
- hawk-2.0.0/tests/cli/test_eval_set.py +175 -0
- hawk-2.0.0/tests/cli/test_human.py +130 -0
- hawk-2.0.0/tests/cli/test_human_eval.py +634 -0
- hawk-2.0.0/tests/cli/test_import_cmd.py +332 -0
- hawk-2.0.0/tests/cli/test_list.py +402 -0
- hawk-2.0.0/tests/cli/test_list_jobs.py +174 -0
- hawk-2.0.0/tests/cli/test_local.py +882 -0
- hawk-2.0.0/tests/cli/test_login.py +346 -0
- hawk-2.0.0/tests/cli/test_models.py +59 -0
- hawk-2.0.0/tests/cli/test_monitoring.py +501 -0
- hawk-2.0.0/tests/cli/test_scan_export.py +193 -0
- hawk-2.0.0/tests/cli/test_scan_subcommands.py +148 -0
- hawk-2.0.0/tests/cli/test_seed.py +113 -0
- hawk-2.0.0/tests/cli/test_stacktrace_command.py +151 -0
- hawk-2.0.0/tests/cli/test_stop.py +69 -0
- hawk-2.0.0/tests/cli/test_tokens.py +85 -0
- hawk-2.0.0/tests/cli/test_trace.py +84 -0
- hawk-2.0.0/tests/cli/test_trace_command.py +812 -0
- hawk-2.0.0/tests/cli/test_transcript.py +340 -0
- hawk-2.0.0/tests/cli/test_version_check.py +153 -0
- hawk-2.0.0/tests/cli/test_version_cmd.py +65 -0
- hawk-2.0.0/tests/cli/test_watch.py +224 -0
- hawk-2.0.0/tests/cli/util/__init__.py +0 -0
- hawk-2.0.0/tests/cli/util/test_api.py +193 -0
- hawk-2.0.0/tests/cli/util/test_auth.py +572 -0
- hawk-2.0.0/tests/cli/util/test_responses.py +47 -0
- hawk-2.0.0/tests/cli/util/test_secrets.py +385 -0
- hawk-2.0.0/tests/cli/util/test_table.py +98 -0
- hawk-2.0.0/tests/conftest.py +109 -0
- hawk-2.0.0/tests/core/__init__.py +0 -0
- hawk-2.0.0/tests/core/db/test_alembic_migrations.py +212 -0
- hawk-2.0.0/tests/core/db/test_connection.py +161 -0
- hawk-2.0.0/tests/core/db/test_job_writes.py +179 -0
- hawk-2.0.0/tests/core/db/test_model_group.py +115 -0
- hawk-2.0.0/tests/core/db/test_parallel.py +237 -0
- hawk-2.0.0/tests/core/db/test_rls.py +2195 -0
- hawk-2.0.0/tests/core/db/test_search.py +435 -0
- hawk-2.0.0/tests/core/importer/__init__.py +0 -0
- hawk-2.0.0/tests/core/importer/data_fixtures/eval_logs/small.eval +0 -0
- hawk-2.0.0/tests/core/importer/eval/__init__.py +1 -0
- hawk-2.0.0/tests/core/importer/eval/conftest.py +272 -0
- hawk-2.0.0/tests/core/importer/eval/test_attachment_resolver.py +70 -0
- hawk-2.0.0/tests/core/importer/eval/test_converter.py +1627 -0
- hawk-2.0.0/tests/core/importer/eval/test_externalization.py +136 -0
- hawk-2.0.0/tests/core/importer/eval/test_importer.py +56 -0
- hawk-2.0.0/tests/core/importer/eval/test_sanitization.py +249 -0
- hawk-2.0.0/tests/core/importer/eval/test_utils.py +122 -0
- hawk-2.0.0/tests/core/importer/eval/test_writer_postgres.py +2693 -0
- hawk-2.0.0/tests/core/importer/eval/test_writers.py +303 -0
- hawk-2.0.0/tests/core/importer/scan/__init__.py +0 -0
- hawk-2.0.0/tests/core/importer/scan/conftest.py +302 -0
- hawk-2.0.0/tests/core/importer/scan/test_idempotency.py +248 -0
- hawk-2.0.0/tests/core/importer/scan/test_import_eval_log_scan.py +116 -0
- hawk-2.0.0/tests/core/importer/scan/test_import_transcript_scan.py +747 -0
- hawk-2.0.0/tests/core/monitoring/__init__.py +0 -0
- hawk-2.0.0/tests/core/monitoring/test_eval_status.py +254 -0
- hawk-2.0.0/tests/core/monitoring/test_kubernetes.py +1983 -0
- hawk-2.0.0/tests/core/monitoring/test_monitoring.py +27 -0
- hawk-2.0.0/tests/core/search/test_researcher_queries.py +485 -0
- hawk-2.0.0/tests/core/search/test_service.py +649 -0
- hawk-2.0.0/tests/core/test_constants.py +17 -0
- hawk-2.0.0/tests/core/test_dependencies.py +663 -0
- hawk-2.0.0/tests/core/test_envsubst.py +39 -0
- hawk-2.0.0/tests/core/test_eval_header.py +62 -0
- hawk-2.0.0/tests/core/test_jwt_validator.py +128 -0
- hawk-2.0.0/tests/core/test_model_access.py +56 -0
- hawk-2.0.0/tests/core/test_providers.py +377 -0
- hawk-2.0.0/tests/core/test_runner_config.py +74 -0
- hawk-2.0.0/tests/core/test_sanitize.py +234 -0
- hawk-2.0.0/tests/core/test_scan_export.py +270 -0
- hawk-2.0.0/tests/core/test_scans_types.py +24 -0
- hawk-2.0.0/tests/core/test_shell.py +242 -0
- hawk-2.0.0/tests/core/test_sse.py +72 -0
- hawk-2.0.0/tests/core/test_tracing.py +213 -0
- hawk-2.0.0/tests/core/test_version.py +119 -0
- hawk-2.0.0/tests/core/types/__init__.py +0 -0
- hawk-2.0.0/tests/core/types/test_artifacts.py +55 -0
- hawk-2.0.0/tests/core/types/test_base.py +59 -0
- hawk-2.0.0/tests/core/types/test_evals.py +189 -0
- hawk-2.0.0/tests/core/types/test_lazy_imports.py +62 -0
- hawk-2.0.0/tests/core/types/test_scans.py +204 -0
- hawk-2.0.0/tests/fixtures/__init__.py +0 -0
- hawk-2.0.0/tests/fixtures/db.py +110 -0
- hawk-2.0.0/tests/fixtures/environment.py +30 -0
- hawk-2.0.0/tests/fixtures/eval_logs.py +41 -0
- hawk-2.0.0/tests/fixtures/where.py +439 -0
- hawk-2.0.0/tests/janitor/__init__.py +0 -0
- hawk-2.0.0/tests/janitor/test_janitor.py +392 -0
- hawk-2.0.0/tests/runner/__init__.py +0 -0
- hawk-2.0.0/tests/runner/conftest.py +42 -0
- hawk-2.0.0/tests/runner/data_fixtures/eval_logs/2025-12-13T23-15-44+00-00_class-eval_XDtHXBaqEHGUBoFoinn2wS.eval +0 -0
- hawk-2.0.0/tests/runner/data_fixtures/python-package/README.md +0 -0
- hawk-2.0.0/tests/runner/data_fixtures/python-package/pyproject.toml +11 -0
- hawk-2.0.0/tests/runner/data_fixtures/python-package/python_package/__init__.py +6 -0
- hawk-2.0.0/tests/runner/data_fixtures/task/calculate_sum/__init__.py +0 -0
- hawk-2.0.0/tests/runner/data_fixtures/task/calculate_sum/_registry.py +3 -0
- hawk-2.0.0/tests/runner/data_fixtures/task/calculate_sum/task.py +19 -0
- hawk-2.0.0/tests/runner/data_fixtures/task/pyproject.toml +12 -0
- hawk-2.0.0/tests/runner/test_apply_config_defaults.py +190 -0
- hawk-2.0.0/tests/runner/test_common.py +162 -0
- hawk-2.0.0/tests/runner/test_compose_file.py +472 -0
- hawk-2.0.0/tests/runner/test_credential_helper.py +909 -0
- hawk-2.0.0/tests/runner/test_datadog_metrics.py +92 -0
- hawk-2.0.0/tests/runner/test_entrypoint_secrets.py +294 -0
- hawk-2.0.0/tests/runner/test_eval_set_config.py +206 -0
- hawk-2.0.0/tests/runner/test_logging.py +181 -0
- hawk-2.0.0/tests/runner/test_memory_monitor.py +1164 -0
- hawk-2.0.0/tests/runner/test_observability_headers.py +337 -0
- hawk-2.0.0/tests/runner/test_oom_diagnostics.py +939 -0
- hawk-2.0.0/tests/runner/test_otel_tracing.py +1018 -0
- hawk-2.0.0/tests/runner/test_patch_sandbox_environments.py +88 -0
- hawk-2.0.0/tests/runner/test_process_tree.py +70 -0
- hawk-2.0.0/tests/runner/test_ptrace.py +61 -0
- hawk-2.0.0/tests/runner/test_refresh_token.py +377 -0
- hawk-2.0.0/tests/runner/test_refresh_token_override.py +39 -0
- hawk-2.0.0/tests/runner/test_run_eval_set.py +2237 -0
- hawk-2.0.0/tests/runner/test_run_eval_set_oom_diagnostics.py +105 -0
- hawk-2.0.0/tests/runner/test_run_scan.py +517 -0
- hawk-2.0.0/tests/runner/test_run_scan_resume.py +315 -0
- hawk-2.0.0/tests/runner/test_runner.py +705 -0
- hawk-2.0.0/tests/runner/test_secrets.py +168 -0
- hawk-2.0.0/tests/runner/test_set_memory_high.py +100 -0
- hawk-2.0.0/tests/runner/test_smoke_discovery.py +103 -0
- hawk-2.0.0/tests/runner/test_stop_monitor.py +464 -0
- hawk-2.0.0/tests/runner/test_stuck_eval_monitor.py +197 -0
- hawk-2.0.0/tests/smoke/README.md +58 -0
- hawk-2.0.0/tests/smoke/__init__.py +0 -0
- hawk-2.0.0/tests/smoke/assets/fibonacci.broccoli +15 -0
- hawk-2.0.0/tests/smoke/assets/fibonacci_bad.broccoli +15 -0
- hawk-2.0.0/tests/smoke/conftest.py +120 -0
- hawk-2.0.0/tests/smoke/eval_sets/complicated_task.yaml +37 -0
- hawk-2.0.0/tests/smoke/eval_sets/configurable_sandbox.yaml +25 -0
- hawk-2.0.0/tests/smoke/eval_sets/cost_tracking.yaml +61 -0
- hawk-2.0.0/tests/smoke/eval_sets/env_capture_claude_code.yaml +36 -0
- hawk-2.0.0/tests/smoke/eval_sets/env_capture_human.yaml +20 -0
- hawk-2.0.0/tests/smoke/eval_sets/env_capture_react.yaml +34 -0
- hawk-2.0.0/tests/smoke/eval_sets/fails_scoring.yaml +19 -0
- hawk-2.0.0/tests/smoke/eval_sets/fails_setup.yaml +19 -0
- hawk-2.0.0/tests/smoke/eval_sets/guess_number.yaml +17 -0
- hawk-2.0.0/tests/smoke/eval_sets/human_baseline.yaml +18 -0
- hawk-2.0.0/tests/smoke/eval_sets/manual_scoring.yaml +23 -0
- hawk-2.0.0/tests/smoke/eval_sets/metr_agents_react.yaml +22 -0
- hawk-2.0.0/tests/smoke/eval_sets/metr_agents_react_with_checkpoint_submit.yaml +36 -0
- hawk-2.0.0/tests/smoke/eval_sets/metr_agents_react_with_gated_submit.yaml +45 -0
- hawk-2.0.0/tests/smoke/eval_sets/model_roles.yaml +25 -0
- hawk-2.0.0/tests/smoke/eval_sets/network_sandbox.yaml +22 -0
- hawk-2.0.0/tests/smoke/eval_sets/pico_ctf.yaml +19 -0
- hawk-2.0.0/tests/smoke/eval_sets/real_llm.yaml +16 -0
- hawk-2.0.0/tests/smoke/eval_sets/sample_eval_sets.py +197 -0
- hawk-2.0.0/tests/smoke/eval_sets/say_hello.yaml +17 -0
- hawk-2.0.0/tests/smoke/eval_sets/say_hello_with_tools.yaml +17 -0
- hawk-2.0.0/tests/smoke/eval_sets/task_bridge.yaml +18 -0
- hawk-2.0.0/tests/smoke/framework/__init__.py +0 -0
- hawk-2.0.0/tests/smoke/framework/common.py +64 -0
- hawk-2.0.0/tests/smoke/framework/context.py +120 -0
- hawk-2.0.0/tests/smoke/framework/diagnostics.py +769 -0
- hawk-2.0.0/tests/smoke/framework/ecr_sync.py +172 -0
- hawk-2.0.0/tests/smoke/framework/edit_sample.py +157 -0
- hawk-2.0.0/tests/smoke/framework/env.py +200 -0
- hawk-2.0.0/tests/smoke/framework/env_capture.py +174 -0
- hawk-2.0.0/tests/smoke/framework/env_compare.py +402 -0
- hawk-2.0.0/tests/smoke/framework/eval_set_status.py +106 -0
- hawk-2.0.0/tests/smoke/framework/eval_sets.py +109 -0
- hawk-2.0.0/tests/smoke/framework/human.py +38 -0
- hawk-2.0.0/tests/smoke/framework/human_baseline.py +299 -0
- hawk-2.0.0/tests/smoke/framework/human_eval.py +68 -0
- hawk-2.0.0/tests/smoke/framework/imports.py +81 -0
- hawk-2.0.0/tests/smoke/framework/janitor.py +64 -0
- hawk-2.0.0/tests/smoke/framework/manifests.py +47 -0
- hawk-2.0.0/tests/smoke/framework/models.py +19 -0
- hawk-2.0.0/tests/smoke/framework/preflight.py +74 -0
- hawk-2.0.0/tests/smoke/framework/required_images.py +25 -0
- hawk-2.0.0/tests/smoke/framework/scans.py +98 -0
- hawk-2.0.0/tests/smoke/framework/tool_calls.py +37 -0
- hawk-2.0.0/tests/smoke/framework/viewer.py +208 -0
- hawk-2.0.0/tests/smoke/framework/warehouse.py +198 -0
- hawk-2.0.0/tests/smoke/runner/__init__.py +0 -0
- hawk-2.0.0/tests/smoke/runner/__main__.py +273 -0
- hawk-2.0.0/tests/smoke/runner/discovery.py +203 -0
- hawk-2.0.0/tests/smoke/runner/dump.py +112 -0
- hawk-2.0.0/tests/smoke/runner/events.py +68 -0
- hawk-2.0.0/tests/smoke/runner/executor.py +133 -0
- hawk-2.0.0/tests/smoke/runner/progress.py +142 -0
- hawk-2.0.0/tests/smoke/runner/textual_app.py +307 -0
- hawk-2.0.0/tests/smoke/runner/widgets/__init__.py +5 -0
- hawk-2.0.0/tests/smoke/runner/widgets/progress_header.py +134 -0
- hawk-2.0.0/tests/smoke/runner/widgets/smoke_tree.py +308 -0
- hawk-2.0.0/tests/smoke/runner/widgets/test_detail.py +220 -0
- hawk-2.0.0/tests/smoke/scans/model_roles.yaml +25 -0
- hawk-2.0.0/tests/smoke/scans/sample_scan_configs.py +28 -0
- hawk-2.0.0/tests/smoke/scans/word_counter.yaml +17 -0
- hawk-2.0.0/tests/smoke/scenarios/__init__.py +0 -0
- hawk-2.0.0/tests/smoke/scenarios/test_custom_runner_image.py +58 -0
- hawk-2.0.0/tests/smoke/scenarios/test_env_parity.py +111 -0
- hawk-2.0.0/tests/smoke/scenarios/test_eval_set_status.py +46 -0
- hawk-2.0.0/tests/smoke/scenarios/test_gpu.py +60 -0
- hawk-2.0.0/tests/smoke/scenarios/test_human_baseline.py +51 -0
- hawk-2.0.0/tests/smoke/scenarios/test_import.py +44 -0
- hawk-2.0.0/tests/smoke/scenarios/test_internet_access.py +63 -0
- hawk-2.0.0/tests/smoke/scenarios/test_metr_agents.py +71 -0
- hawk-2.0.0/tests/smoke/scenarios/test_middleman_anthropic_wif.py +111 -0
- hawk-2.0.0/tests/smoke/scenarios/test_middleman_health.py +28 -0
- hawk-2.0.0/tests/smoke/scenarios/test_middleman_models.py +22 -0
- hawk-2.0.0/tests/smoke/scenarios/test_network_connectivity.py +110 -0
- hawk-2.0.0/tests/smoke/scenarios/test_otel_tracing.py +72 -0
- hawk-2.0.0/tests/smoke/scenarios/test_outcomes.py +306 -0
- hawk-2.0.0/tests/smoke/scenarios/test_real_llm.py +97 -0
- hawk-2.0.0/tests/smoke/scenarios/test_sample_edit.py +237 -0
- hawk-2.0.0/tests/smoke/scenarios/test_scan.py +113 -0
- hawk-2.0.0/tests/smoke/scenarios/test_search_perf.py +122 -0
- hawk-2.0.0/tests/smoke/scenarios/test_task_bridge.py +90 -0
- hawk-2.0.0/tests/smoke/scenarios/test_tools.py +42 -0
- hawk-2.0.0/tests/smoke/test_middleman_admin_cli.py +37 -0
- hawk-2.0.0/tests/smoke/test_middleman_admin_models.py +75 -0
- hawk-2.0.0/tests/smoke/test_middleman_admin_secrets.py +65 -0
- hawk-2.0.0/tests/test_e2e.py +511 -0
- hawk-2.0.0/tests/test_smoke_diagnostics.py +432 -0
- hawk-2.0.0/tests/util/__init__.py +0 -0
- hawk-2.0.0/tests/util/test_configs.py +17 -0
- hawk-2.0.0/uv.lock +5002 -0
- hawk-2.0.0/www/.gitignore +4 -0
- hawk-2.0.0/www/.prettierignore +10 -0
- hawk-2.0.0/www/.prettierrc +13 -0
- hawk-2.0.0/www/CLAUDE.md +1 -0
- hawk-2.0.0/www/README.md +22 -0
- hawk-2.0.0/www/eslint.config.js +82 -0
- hawk-2.0.0/www/index.html +56 -0
- hawk-2.0.0/www/package.json +103 -0
- hawk-2.0.0/www/pnpm-lock.yaml +5516 -0
- hawk-2.0.0/www/pnpm-workspace.yaml +3 -0
- hawk-2.0.0/www/public/favicon.svg +16 -0
- hawk-2.0.0/www/src/AppRouter.tsx +108 -0
- hawk-2.0.0/www/src/EvalApp.tsx +256 -0
- hawk-2.0.0/www/src/EvalPage.tsx +8 -0
- hawk-2.0.0/www/src/EvalSetListPage.tsx +8 -0
- hawk-2.0.0/www/src/JobsPage.tsx +81 -0
- hawk-2.0.0/www/src/QueryProvider.tsx +15 -0
- hawk-2.0.0/www/src/SamplesPage.tsx +8 -0
- hawk-2.0.0/www/src/ScanApp.tsx +54 -0
- hawk-2.0.0/www/src/ScanPage.tsx +9 -0
- hawk-2.0.0/www/src/ScansPage.tsx +8 -0
- hawk-2.0.0/www/src/TranscriptSearchPage.tsx +7 -0
- hawk-2.0.0/www/src/components/ErrorDisplay.tsx +31 -0
- hawk-2.0.0/www/src/components/EvalSetFilter.tsx +146 -0
- hawk-2.0.0/www/src/components/EvalSetList.tsx +299 -0
- hawk-2.0.0/www/src/components/EvalSetStatusBar.tsx +423 -0
- hawk-2.0.0/www/src/components/JobsList.tsx +486 -0
- hawk-2.0.0/www/src/components/Layout.tsx +56 -0
- hawk-2.0.0/www/src/components/LoadingDisplay.tsx +23 -0
- hawk-2.0.0/www/src/components/SampleList.tsx +733 -0
- hawk-2.0.0/www/src/components/ScanList.tsx +266 -0
- hawk-2.0.0/www/src/components/SearchSnippet.test.tsx +48 -0
- hawk-2.0.0/www/src/components/SearchSnippet.tsx +59 -0
- hawk-2.0.0/www/src/components/ThemePicker.tsx +210 -0
- hawk-2.0.0/www/src/components/TranscriptSearchList.tsx +409 -0
- hawk-2.0.0/www/src/components/UserMenu.tsx +168 -0
- hawk-2.0.0/www/src/components/ag-grid/cellRenderers.tsx +117 -0
- hawk-2.0.0/www/src/components/ag-grid/formatters.ts +10 -0
- hawk-2.0.0/www/src/components/ag-grid/isCopyButtonClick.ts +9 -0
- hawk-2.0.0/www/src/components/ag-grid/styles.css +238 -0
- hawk-2.0.0/www/src/components/artifacts/ArtifactPanel.tsx +108 -0
- hawk-2.0.0/www/src/components/artifacts/ArtifactSplitPane.tsx +150 -0
- hawk-2.0.0/www/src/components/artifacts/CsvViewer.tsx +57 -0
- hawk-2.0.0/www/src/components/artifacts/FileBrowser.tsx +65 -0
- hawk-2.0.0/www/src/components/artifacts/FileViewer.tsx +82 -0
- hawk-2.0.0/www/src/components/artifacts/HtmlViewer.test.tsx +83 -0
- hawk-2.0.0/www/src/components/artifacts/HtmlViewer.tsx +68 -0
- hawk-2.0.0/www/src/components/artifacts/ImageViewer.tsx +16 -0
- hawk-2.0.0/www/src/components/artifacts/JsonViewer.tsx +31 -0
- hawk-2.0.0/www/src/components/artifacts/MarkdownViewer.tsx +37 -0
- hawk-2.0.0/www/src/components/artifacts/PdfViewer.tsx +21 -0
- hawk-2.0.0/www/src/components/artifacts/SvgViewer.test.tsx +82 -0
- hawk-2.0.0/www/src/components/artifacts/SvgViewer.tsx +68 -0
- hawk-2.0.0/www/src/components/artifacts/TextViewer.tsx +21 -0
- hawk-2.0.0/www/src/components/artifacts/UnknownViewer.tsx +44 -0
- hawk-2.0.0/www/src/components/artifacts/VideoViewer.tsx +13 -0
- hawk-2.0.0/www/src/components/artifacts/ViewerActions.tsx +71 -0
- hawk-2.0.0/www/src/components/artifacts/ViewerChrome.tsx +222 -0
- hawk-2.0.0/www/src/components/artifacts/index.ts +4 -0
- hawk-2.0.0/www/src/config/env.ts +57 -0
- hawk-2.0.0/www/src/contexts/ArtifactViewContext.tsx +68 -0
- hawk-2.0.0/www/src/contexts/AuthContext.tsx +125 -0
- hawk-2.0.0/www/src/hooks/useAbortController.ts +43 -0
- hawk-2.0.0/www/src/hooks/useApiFetch.ts +56 -0
- hawk-2.0.0/www/src/hooks/useArtifactNeighborPrefetch.test.ts +77 -0
- hawk-2.0.0/www/src/hooks/useArtifactNeighborPrefetch.ts +91 -0
- hawk-2.0.0/www/src/hooks/useEvalAppScrollDirection.ts +66 -0
- hawk-2.0.0/www/src/hooks/useEvalSetConfig.ts +41 -0
- hawk-2.0.0/www/src/hooks/useEvalSetGate.ts +132 -0
- hawk-2.0.0/www/src/hooks/useEvalSetStatus.ts +160 -0
- hawk-2.0.0/www/src/hooks/useEvalSets.ts +131 -0
- hawk-2.0.0/www/src/hooks/useInlinedImageHtml.ts +106 -0
- hawk-2.0.0/www/src/hooks/useInspectApi.ts +390 -0
- hawk-2.0.0/www/src/hooks/useIsDarkTheme.ts +36 -0
- hawk-2.0.0/www/src/hooks/useJobBadgeStatus.ts +175 -0
- hawk-2.0.0/www/src/hooks/useJobLogs.ts +119 -0
- hawk-2.0.0/www/src/hooks/useJobStatus.ts +159 -0
- hawk-2.0.0/www/src/hooks/useJobs.ts +109 -0
- hawk-2.0.0/www/src/hooks/useSampleFileUrl.ts +105 -0
- hawk-2.0.0/www/src/hooks/useSampleFiles.ts +60 -0
- hawk-2.0.0/www/src/hooks/useSampleMeta.ts +42 -0
- hawk-2.0.0/www/src/hooks/useSampleSummary.ts +54 -0
- hawk-2.0.0/www/src/hooks/useSanitizedHtmlPreview.ts +38 -0
- hawk-2.0.0/www/src/hooks/useScans.ts +85 -0
- hawk-2.0.0/www/src/hooks/useScoutApi.ts +111 -0
- hawk-2.0.0/www/src/hooks/useTextPreview.ts +66 -0
- hawk-2.0.0/www/src/index.css +127 -0
- hawk-2.0.0/www/src/main.tsx +8 -0
- hawk-2.0.0/www/src/pages/ArtifactPage.tsx +63 -0
- hawk-2.0.0/www/src/pages/EvalSetNotFoundPage.tsx +32 -0
- hawk-2.0.0/www/src/pages/EvalSetPendingPage.tsx +88 -0
- hawk-2.0.0/www/src/pages/EvalSetStatusPage.tsx +591 -0
- hawk-2.0.0/www/src/pages/LaunchPage.tsx +598 -0
- hawk-2.0.0/www/src/pages/OAuthCallback.tsx +118 -0
- hawk-2.0.0/www/src/pages/ReportPage.tsx +70 -0
- hawk-2.0.0/www/src/pages/SampleFileFullPage.tsx +27 -0
- hawk-2.0.0/www/src/routes/SamplePermalink.tsx +44 -0
- hawk-2.0.0/www/src/theme.ts +225 -0
- hawk-2.0.0/www/src/types/artifactResource.test.ts +39 -0
- hawk-2.0.0/www/src/types/artifactResource.ts +62 -0
- hawk-2.0.0/www/src/types/artifacts.ts +116 -0
- hawk-2.0.0/www/src/types/auth.ts +7 -0
- hawk-2.0.0/www/src/types/jobs.ts +52 -0
- hawk-2.0.0/www/src/types/monitoring.ts +188 -0
- hawk-2.0.0/www/src/types/samples.ts +86 -0
- hawk-2.0.0/www/src/types/scans.ts +20 -0
- hawk-2.0.0/www/src/types/search.ts +59 -0
- hawk-2.0.0/www/src/utils/csvUtils.test.ts +59 -0
- hawk-2.0.0/www/src/utils/csvUtils.ts +48 -0
- hawk-2.0.0/www/src/utils/datetime.test.ts +66 -0
- hawk-2.0.0/www/src/utils/datetime.ts +30 -0
- hawk-2.0.0/www/src/utils/fetchText.ts +62 -0
- hawk-2.0.0/www/src/utils/fileKind.test.ts +40 -0
- hawk-2.0.0/www/src/utils/fileKind.ts +93 -0
- hawk-2.0.0/www/src/utils/formatters.test.ts +16 -0
- hawk-2.0.0/www/src/utils/formatters.ts +15 -0
- hawk-2.0.0/www/src/utils/headerProvider.ts +25 -0
- hawk-2.0.0/www/src/utils/htmlSanitization.test.ts +429 -0
- hawk-2.0.0/www/src/utils/htmlSanitization.ts +219 -0
- hawk-2.0.0/www/src/utils/jobStatus.ts +54 -0
- hawk-2.0.0/www/src/utils/oauth.ts +85 -0
- hawk-2.0.0/www/src/utils/pkce.ts +90 -0
- hawk-2.0.0/www/src/utils/refreshToken.ts +42 -0
- hawk-2.0.0/www/src/utils/resolveInlineImages.test.ts +398 -0
- hawk-2.0.0/www/src/utils/resolveInlineImages.ts +365 -0
- hawk-2.0.0/www/src/utils/sampleContentUrls.ts +40 -0
- hawk-2.0.0/www/src/utils/sse.test.ts +96 -0
- hawk-2.0.0/www/src/utils/sse.ts +70 -0
- hawk-2.0.0/www/src/utils/tokenStorage.ts +43 -0
- hawk-2.0.0/www/src/utils/tokenValidation.ts +69 -0
- hawk-2.0.0/www/src/utils/url.ts +24 -0
- hawk-2.0.0/www/src/utils/viewerLimits.test.ts +29 -0
- hawk-2.0.0/www/src/utils/viewerLimits.ts +20 -0
- hawk-2.0.0/www/src/utils/yaml.ts +14 -0
- hawk-2.0.0/www/src/vite-env.d.ts +16 -0
- hawk-2.0.0/www/tailwind.config.js +11 -0
- hawk-2.0.0/www/tsconfig.json +24 -0
- hawk-2.0.0/www/vite.config.ts +69 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs: hawk/api/**/*.py
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# API Development Patterns
|
|
7
|
+
|
|
8
|
+
- Use FastAPI dependency injection for shared resources
|
|
9
|
+
- Define Pydantic models for all request and response bodies
|
|
10
|
+
- Use async def for all endpoint handlers
|
|
11
|
+
- Use the `validate_access_token` middleware (automatically added to all endpoints) for authentication
|
|
12
|
+
- Return appropriate HTTP status codes (201 for creation, 204 for deletion, etc.)
|
|
13
|
+
- Include proper OpenAPI documentation in endpoints
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs: hawk/*.py
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# CLI Development Structure
|
|
7
|
+
|
|
8
|
+
## Architecture
|
|
9
|
+
- `cli.py` contains command definitions and presentation logic only
|
|
10
|
+
- Each command's business logic lives in a separate file (e.g., `login.py`, `view.py`, `runs.py`)
|
|
11
|
+
- Keep `cli.py` focused on:
|
|
12
|
+
- Command definitions with Click decorators
|
|
13
|
+
- Argument parsing and validation
|
|
14
|
+
- Output formatting and presentation
|
|
15
|
+
- User interaction logic
|
|
16
|
+
|
|
17
|
+
## Click Patterns
|
|
18
|
+
- Use `click.echo()` for output, not print()
|
|
19
|
+
- Import business logic in-line, only in the command handlers where it is used
|
|
20
|
+
|
|
21
|
+
Example structure:
|
|
22
|
+
```python
|
|
23
|
+
# In cli.py
|
|
24
|
+
@click.command()
|
|
25
|
+
@click.option('--format', type=click.Choice(['json', 'table']))
|
|
26
|
+
def my_command(format):
|
|
27
|
+
import hawk.my_command
|
|
28
|
+
|
|
29
|
+
result = my_command()
|
|
30
|
+
click.echo(format_output(result, format))
|
|
31
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs: hawk/api/**/*.py,hawk/api/helm_chart/**/*
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Kubernetes Operations
|
|
7
|
+
|
|
8
|
+
- **Important**: We use a Helm chart to create Kubernetes objects. Add new resources to the Helm chart instead of creating them directly with the k8s client
|
|
9
|
+
- The Helm chart is located at `hawk/api/helm_chart/`
|
|
10
|
+
- The Hawk API server uses pyhelm3 (https://github.com/azimuth-cloud/pyhelm3) to execute Helm commands. Under the hood, this delegates to the helm CLI
|
|
11
|
+
- Only the API server should execute Helm commands using pyhelm3. No other component should do that
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
# Python Development Standards
|
|
7
|
+
|
|
8
|
+
Based on the Google Python Style Guide with project-specific additions.
|
|
9
|
+
|
|
10
|
+
## Imports
|
|
11
|
+
- Use `import x` for packages and modules only, not for individual classes or functions
|
|
12
|
+
- Import modules: `import pathlib` and reference `pathlib.Path` instead of `from pathlib import Path`
|
|
13
|
+
- Importing with alias is acceptable: `import a.b.c as c`
|
|
14
|
+
- Use full package names to avoid conflicts: `from sound.effects import echo`
|
|
15
|
+
- Exceptions: typing, collections.abc, and typing_extensions symbols can be imported directly
|
|
16
|
+
|
|
17
|
+
## Type Annotations
|
|
18
|
+
- Use Pydantic models for all data structures that need validation
|
|
19
|
+
|
|
20
|
+
## Comments and Docstrings
|
|
21
|
+
- Keep comments minimal - explain WHY not WHAT
|
|
22
|
+
- Use comments only when the reasoning behind code isn't obvious
|
|
23
|
+
- And, prefer to rewrite the code to be clearer instead of leaving such comments
|
|
24
|
+
- Write docstrings when it isn't clear what a function does from its name and arguments, or for functions that are part of the public interface of some component of the system
|
|
25
|
+
|
|
26
|
+
## Naming Conventions
|
|
27
|
+
- Avoid single character names except for counters or iterators
|
|
28
|
+
- Use descriptive names: `employee_ids` not `e_ids`
|
|
29
|
+
|
|
30
|
+
## Language Features
|
|
31
|
+
- Use list/dict/set comprehensions for simple cases
|
|
32
|
+
- Use generators for large data processing
|
|
33
|
+
- Properties: use `@property` for simple attribute access
|
|
34
|
+
- Lambda functions: only for one-liners, otherwise use regular functions
|
|
35
|
+
- Conditional expressions: use sparingly for simple cases
|
|
36
|
+
- Avoid global state except for module-level constants
|
|
37
|
+
|
|
38
|
+
## Error Handling
|
|
39
|
+
- Document exceptions raised by a method using a "Raises" section in the docstring
|
|
40
|
+
|
|
41
|
+
## Best Practices
|
|
42
|
+
- Use parentheses for line continuation, not backslashes
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs: **/tests/**/*
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Testing Standards
|
|
7
|
+
|
|
8
|
+
## pytest Conventions
|
|
9
|
+
- Use pytest-asyncio for testing async code
|
|
10
|
+
- Always use `pytest-mock` with `autospec=True`:
|
|
11
|
+
```python
|
|
12
|
+
mocker.patch('module.Class', autospec=True)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameterization
|
|
16
|
+
- Use `@pytest.mark.parametrize` instead of multiple similar tests
|
|
17
|
+
- Use `pytest.param` with `id` parameter for descriptive test names
|
|
18
|
+
- For error cases:
|
|
19
|
+
```python
|
|
20
|
+
@pytest.mark.parametrize(
|
|
21
|
+
("input", "expected_error"),
|
|
22
|
+
[
|
|
23
|
+
("valid", None),
|
|
24
|
+
("invalid", pytest.raises(ValueError)),
|
|
25
|
+
]
|
|
26
|
+
)
|
|
27
|
+
def test_function(input, expected_error):
|
|
28
|
+
with expected_error or contextlib.nullcontext():
|
|
29
|
+
function(input)
|
|
30
|
+
```
|
|
31
|
+
- Avoid putting too much conditional logic in the test itself.
|
|
32
|
+
```python
|
|
33
|
+
# Bad
|
|
34
|
+
if input1 == "abc":
|
|
35
|
+
assert result == "def"
|
|
36
|
+
else:
|
|
37
|
+
assert result == "ghi"
|
|
38
|
+
|
|
39
|
+
# Good
|
|
40
|
+
# Add an expected_result parameter to the test's pytest.params, then:
|
|
41
|
+
assert result == expected_result
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## AWS Mocking
|
|
45
|
+
- Use moto for mocking AWS services wherever possible:
|
|
46
|
+
```python
|
|
47
|
+
@mock_s3
|
|
48
|
+
async def test_s3_operation():
|
|
49
|
+
# moto automatically mocks aioboto3 calls
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Assertions
|
|
53
|
+
- If it's unclear at a glance what an assertion is testing, add a message, like `assert False, "Message here"`
|
|
54
|
+
|
|
55
|
+
## Test Organization
|
|
56
|
+
- Mirror the source code structure in tests/
|
|
57
|
+
- Name test files as `test_<module>.py`
|
hawk-2.0.0/.dockerignore
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
*
|
|
2
|
+
|
|
3
|
+
!.python-version
|
|
4
|
+
!uv.lock
|
|
5
|
+
!pyproject.toml
|
|
6
|
+
!README.md
|
|
7
|
+
!.python-version
|
|
8
|
+
|
|
9
|
+
!hawk
|
|
10
|
+
hawk/**
|
|
11
|
+
!hawk/**/*.py
|
|
12
|
+
!hawk/api/helm_chart/**/*.yaml
|
|
13
|
+
|
|
14
|
+
!services
|
|
15
|
+
services/**
|
|
16
|
+
!services/modules/**/*.py
|
|
17
|
+
!services/modules/*/pyproject.toml
|
|
18
|
+
!services/modules/*/README.md
|
|
19
|
+
!services/modules/*/uv.lock
|
|
20
|
+
!services/modules/viewer/nginx.conf
|
|
21
|
+
|
|
22
|
+
!www
|
|
23
|
+
www/**
|
|
24
|
+
!www/package.json
|
|
25
|
+
!www/pnpm-lock.yaml
|
|
26
|
+
!www/pnpm-workspace.yaml
|
|
27
|
+
!www/index.html
|
|
28
|
+
!www/eslint.config.js
|
|
29
|
+
!www/tsconfig.json
|
|
30
|
+
!www/vite.config.ts
|
|
31
|
+
!www/tailwind.config.js
|
|
32
|
+
!www/src
|
|
33
|
+
!www/src/**
|
|
34
|
+
!www/public
|
|
35
|
+
!www/public/**
|
|
36
|
+
|
|
37
|
+
hawk/tests/**
|
|
38
|
+
**/.venv/**
|
hawk-2.0.0/.editorconfig
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
indent_style = space
|
|
6
|
+
indent_size = 2
|
|
7
|
+
end_of_line = lf
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.md]
|
|
12
|
+
indent_size = 4
|
|
13
|
+
trim_trailing_whitespace = false
|
|
14
|
+
insert_final_newline = false
|
|
15
|
+
|
|
16
|
+
[*.{py,sh,ipynb}]
|
|
17
|
+
indent_size = 4
|
|
18
|
+
|
|
19
|
+
[{Dockerfile,uv.lock}]
|
|
20
|
+
indent_size = 4
|
hawk-2.0.0/.env.example
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Hawk development environment configuration
|
|
2
|
+
# Copy this file to .env and adjust values for your setup:
|
|
3
|
+
# cp .env.example .env
|
|
4
|
+
|
|
5
|
+
# CLI
|
|
6
|
+
HAWK_API_URL=http://localhost:8080
|
|
7
|
+
|
|
8
|
+
# API service
|
|
9
|
+
|
|
10
|
+
# Auth — REQUIRED. The API server will not start without these.
|
|
11
|
+
# For local dev with docker compose, the bundled Dex IDP provides these automatically.
|
|
12
|
+
# If not using Dex, set these to match your OIDC provider.
|
|
13
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_AUDIENCE=<your-oidc-audience>
|
|
14
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_AUTHORIZATION_ENDPOINT=
|
|
15
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_CLIENT_ID=<your-oidc-client-id>
|
|
16
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_DEFAULT_PERMISSIONS=
|
|
17
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_DEVICE_AUTHORIZATION_ENDPOINT=
|
|
18
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_EMAIL_FIELD=
|
|
19
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_ISSUER=<your-oidc-issuer>
|
|
20
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_JWKS_URI=
|
|
21
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_REVOCATION_ENDPOINT=
|
|
22
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_SCOPES=
|
|
23
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_SCOPES_SUPPORTED=<["your","idp","supported","scopes"]>
|
|
24
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_TOKEN_ENDPOINT=
|
|
25
|
+
|
|
26
|
+
# Admin (owner-bypass) — both optional, off by default. A JWT claim whose
|
|
27
|
+
# boolean-true value grants admin, and/or permission/group names that grant admin.
|
|
28
|
+
# HAWK_API_MODEL_ACCESS_TOKEN_ADMIN_CLAIM=https://example.com/claims/admin
|
|
29
|
+
# HAWK_API_ADMIN_PERMISSIONS=["hawk-admin"]
|
|
30
|
+
|
|
31
|
+
HAWK_API_DATABASE_URL=postgresql://inspect:inspect@warehouse:5432/inspect
|
|
32
|
+
HAWK_API_KUBECONFIG_FILE=/home/nonroot/.kube/config
|
|
33
|
+
HAWK_API_MIDDLEMAN_API_URL=http://middleman:3500
|
|
34
|
+
|
|
35
|
+
HAWK_API_S3_BUCKET_NAME=inspect-data
|
|
36
|
+
|
|
37
|
+
# AWS credentials for API server to access MinIO
|
|
38
|
+
AWS_ACCESS_KEY_ID=minioadmin
|
|
39
|
+
AWS_SECRET_ACCESS_KEY=minioadmin
|
|
40
|
+
AWS_ENDPOINT_URL_S3=http://minio:9000
|
|
41
|
+
AWS_REGION=us-west-1
|
|
42
|
+
|
|
43
|
+
HAWK_API_APP_NAME=inspect-ai
|
|
44
|
+
HAWK_API_RUNNER_CLUSTER_ROLE_NAME=inspect-ai-runner
|
|
45
|
+
HAWK_API_RUNNER_DEFAULT_IMAGE_URI=registry:5000/runner:latest
|
|
46
|
+
HAWK_API_RUNNER_MEMORY=16Gi
|
|
47
|
+
HAWK_API_RUNNER_NAMESPACE=inspect
|
|
48
|
+
HAWK_API_RUNNER_NAMESPACE_PREFIX=inspect
|
|
49
|
+
HAWK_API_TASK_BRIDGE_REPOSITORY=registry:5000/task-bridge
|
|
50
|
+
HAWK_API_DOCKER_IMAGE_REPO=registry:5000/tasks
|
|
51
|
+
HAWK_API_ALLOW_LOCAL_DEPENDENCY_VALIDATION=true
|
|
52
|
+
HAWK_API_EVAL_SET_RETRY_ATTEMPTS=1
|
|
53
|
+
|
|
54
|
+
# Runner
|
|
55
|
+
INSPECT_METR_TASK_BRIDGE_REPOSITORY=registry:5000/task-bridge
|
|
56
|
+
|
|
57
|
+
# Runner secrets: Forward env vars to runners automatically
|
|
58
|
+
# Pattern: HAWK_API_RUNNER_SECRET_<VAR_NAME>=<value>
|
|
59
|
+
# The prefix is stripped and the rest becomes the env var name in the runner
|
|
60
|
+
# Example: HAWK_API_RUNNER_SECRET_OPENAI_API_KEY=sk-... forwards as OPENAI_API_KEY=sk-...
|
|
61
|
+
HAWK_API_RUNNER_SECRET_AWS_ACCESS_KEY_ID=test
|
|
62
|
+
HAWK_API_RUNNER_SECRET_AWS_SECRET_ACCESS_KEY=testtest
|
|
63
|
+
HAWK_API_RUNNER_SECRET_AWS_ENDPOINT_URL_S3=http://minio:9000
|
|
64
|
+
|
|
65
|
+
# Uncomment and set values to forward API keys to runners:
|
|
66
|
+
# HAWK_API_RUNNER_SECRET_GITHUB_TOKEN=ghp_xxxx
|
|
67
|
+
# HAWK_API_RUNNER_SECRET_OPENAI_API_KEY=sk-xxxx
|
|
68
|
+
# HAWK_API_RUNNER_SECRET_ANTHROPIC_API_KEY=sk-ant-xxxx
|
|
69
|
+
|
|
70
|
+
# UI
|
|
71
|
+
VITE_API_BASE_URL=http://localhost:8080
|
|
72
|
+
# These should be autodiscovered via Hawk API, set here to override
|
|
73
|
+
# VITE_OIDC_ISSUER=
|
|
74
|
+
# VITE_OIDC_CLIENT_ID=
|
|
75
|
+
# VITE_OIDC_AUTHORIZE_ENDPOINT=
|
|
76
|
+
# VITE_OIDC_SCOPES=
|
|
77
|
+
VITE_LOG_LEVEL=debug
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hawk/api/EvalSetConfig.schema.json linguist-generated=true
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
name: Weekly Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 9 * * 1" # Monday 9am UTC
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: weekly-release
|
|
10
|
+
cancel-in-progress: false
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
runs-on: ubuntu-24.04
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
id-token: write
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/create-github-app-token@v2.2.0
|
|
20
|
+
id: app-token
|
|
21
|
+
with:
|
|
22
|
+
app-id: ${{ vars.CI_BOT_APP_ID }}
|
|
23
|
+
private-key: ${{ secrets.CI_BOT_PRIVATE_KEY }}
|
|
24
|
+
owner: ${{ github.repository_owner }}
|
|
25
|
+
repositories: ${{ github.event.repository.name }}
|
|
26
|
+
|
|
27
|
+
- name: Set up Git user
|
|
28
|
+
env:
|
|
29
|
+
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
|
|
30
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
31
|
+
run: |
|
|
32
|
+
user_id="$(gh api "/users/${APP_SLUG}[bot]" --jq .id)"
|
|
33
|
+
git config --global user.name "${APP_SLUG}[bot]"
|
|
34
|
+
git config --global user.email "${user_id}+${APP_SLUG}[bot]@users.noreply.github.com"
|
|
35
|
+
|
|
36
|
+
- name: Checkout
|
|
37
|
+
uses: actions/checkout@v6.0.0
|
|
38
|
+
with:
|
|
39
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
40
|
+
fetch-depth: 0
|
|
41
|
+
|
|
42
|
+
- name: Determine next version
|
|
43
|
+
id: version
|
|
44
|
+
run: |
|
|
45
|
+
latest_tag=$(git tag --list 'v*' --sort=-version:refname | head -n1)
|
|
46
|
+
if [ -z "$latest_tag" ]; then
|
|
47
|
+
echo "No existing tag found"
|
|
48
|
+
exit 1
|
|
49
|
+
fi
|
|
50
|
+
echo "latest_tag=$latest_tag" >> "$GITHUB_OUTPUT"
|
|
51
|
+
|
|
52
|
+
if [ -z "$(git log "${latest_tag}..HEAD" --oneline)" ]; then
|
|
53
|
+
echo "No new commits since $latest_tag — skipping release"
|
|
54
|
+
echo "skip=true" >> "$GITHUB_OUTPUT"
|
|
55
|
+
exit 0
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# CalVer: vYYYY.MM.DD
|
|
59
|
+
next_tag="v$(date -u +'%Y.%m.%d')"
|
|
60
|
+
|
|
61
|
+
# Handle multiple releases on the same day
|
|
62
|
+
if git tag --list "$next_tag" | grep -q .; then
|
|
63
|
+
i=1
|
|
64
|
+
while git tag --list "${next_tag}.${i}" | grep -q .; do
|
|
65
|
+
i=$((i + 1))
|
|
66
|
+
done
|
|
67
|
+
next_tag="${next_tag}.${i}"
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
echo "next_tag=$next_tag" >> "$GITHUB_OUTPUT"
|
|
71
|
+
|
|
72
|
+
- name: Create tag and release
|
|
73
|
+
if: steps.version.outputs.skip != 'true'
|
|
74
|
+
id: release
|
|
75
|
+
env:
|
|
76
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
77
|
+
NEXT_TAG: ${{ steps.version.outputs.next_tag }}
|
|
78
|
+
LATEST_TAG: ${{ steps.version.outputs.latest_tag }}
|
|
79
|
+
run: |
|
|
80
|
+
git tag "$NEXT_TAG"
|
|
81
|
+
git push origin "$NEXT_TAG"
|
|
82
|
+
gh release create "$NEXT_TAG" \
|
|
83
|
+
--generate-notes \
|
|
84
|
+
--notes-start-tag "$LATEST_TAG"
|
|
85
|
+
|
|
86
|
+
- name: Post release summary to Slack
|
|
87
|
+
if: steps.release.outcome == 'success'
|
|
88
|
+
env:
|
|
89
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
90
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
91
|
+
SLACK_WEBHOOK_URL: ${{ secrets.RELEASE_SLACK_WEBHOOK_URL }}
|
|
92
|
+
NEXT_TAG: ${{ steps.version.outputs.next_tag }}
|
|
93
|
+
run: |
|
|
94
|
+
release_url="https://github.com/${{ github.repository }}/releases/tag/${NEXT_TAG}"
|
|
95
|
+
notes=$(gh release view "$NEXT_TAG" --json body -q .body)
|
|
96
|
+
|
|
97
|
+
summary=$(jq -n \
|
|
98
|
+
--arg notes "$notes" \
|
|
99
|
+
--arg tag "$NEXT_TAG" \
|
|
100
|
+
'{
|
|
101
|
+
model: "claude-opus-4-6",
|
|
102
|
+
max_tokens: 4096,
|
|
103
|
+
messages: [{
|
|
104
|
+
role: "user",
|
|
105
|
+
content: ("You are summarizing a weekly release of Hawk, an infrastructure system for running AI evaluations (via Inspect AI) and scans (via Inspect Scout) in Kubernetes. Given the GitHub release notes below, write a brief Slack update (3-8 bullet points) highlighting researcher- and user-facing changes. Omit internal refactors, CI changes, and dependency bumps unless they affect users. Use plain language, not raw PR titles. If there are no user-facing changes worth highlighting, just say \"Maintenance and internal improvements only — no user-facing changes this week.\"\n\nAfter the bullet points, add a blank line and then a short, fun inspirational or motivational quote that thematically relates to the changes in this release. Be creative — it can be a real quote, a playful riff, or something original. Format it in italics like: _\"The quote here.\"_\n\nIMPORTANT: Use Slack mrkdwn formatting, NOT standard Markdown. Bold is *single asterisks*, not **double**. Italic is _underscores_. Code is `backticks`. Do not use any other formatting.\n\nOutput ONLY the bullet points followed by the quote, no preamble or header.\n\nRelease: " + $tag + "\n\nRelease notes:\n" + $notes)
|
|
106
|
+
}]
|
|
107
|
+
}' \
|
|
108
|
+
| curl -sf https://api.anthropic.com/v1/messages \
|
|
109
|
+
-H "content-type: application/json" \
|
|
110
|
+
-H "x-api-key: $ANTHROPIC_API_KEY" \
|
|
111
|
+
-H "anthropic-version: 2023-06-01" \
|
|
112
|
+
-d @- \
|
|
113
|
+
| jq -r '.content[0].text')
|
|
114
|
+
|
|
115
|
+
if [ -z "$summary" ] || [ "$summary" = "null" ]; then
|
|
116
|
+
summary="(Could not generate AI summary for this release.)"
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
slack_message=$(printf '*Hawk %s is out* :rocket:\n\n%s\n\n<%s|Full release notes>' "$NEXT_TAG" "$summary" "$release_url")
|
|
120
|
+
|
|
121
|
+
jq -n --arg text "$slack_message" '{text: $text}' \
|
|
122
|
+
| curl -sf -X POST -H 'Content-type: application/json' -d @- "$SLACK_WEBHOOK_URL"
|