agent-paranoid-android 0.5.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.
- agent_paranoid_android-0.5.0/.env.example +6 -0
- agent_paranoid_android-0.5.0/.github/ISSUE_TEMPLATE/bug_report.yml +68 -0
- agent_paranoid_android-0.5.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- agent_paranoid_android-0.5.0/.github/ISSUE_TEMPLATE/feature_request.yml +47 -0
- agent_paranoid_android-0.5.0/.github/PULL_REQUEST_TEMPLATE.md +22 -0
- agent_paranoid_android-0.5.0/.github/dependabot.yml +25 -0
- agent_paranoid_android-0.5.0/.github/workflows/ci.yml +146 -0
- agent_paranoid_android-0.5.0/.github/workflows/release.yml +106 -0
- agent_paranoid_android-0.5.0/.github/workflows/security.yml +66 -0
- agent_paranoid_android-0.5.0/.gitignore +219 -0
- agent_paranoid_android-0.5.0/AGENTS.md +182 -0
- agent_paranoid_android-0.5.0/CHANGELOG.md +158 -0
- agent_paranoid_android-0.5.0/CONTRIBUTING.md +88 -0
- agent_paranoid_android-0.5.0/LICENSE +21 -0
- agent_paranoid_android-0.5.0/PKG-INFO +1092 -0
- agent_paranoid_android-0.5.0/README.md +1054 -0
- agent_paranoid_android-0.5.0/SECURITY.md +64 -0
- agent_paranoid_android-0.5.0/docs/agent_design.md +118 -0
- agent_paranoid_android-0.5.0/docs/ai_integration.md +169 -0
- agent_paranoid_android-0.5.0/docs/architecture.puml +241 -0
- agent_paranoid_android-0.5.0/docs/architecture_agent_workflow.puml +58 -0
- agent_paranoid_android-0.5.0/docs/architecture_safety_boundaries.puml +82 -0
- agent_paranoid_android-0.5.0/docs/dataset_profile_and_spec.md +214 -0
- agent_paranoid_android-0.5.0/docs/domain_agnostic_refactoring_plan.md +577 -0
- agent_paranoid_android-0.5.0/docs/domain_agnostic_workflow.md +220 -0
- agent_paranoid_android-0.5.0/docs/implementation_map.md +161 -0
- agent_paranoid_android-0.5.0/docs/mcp_examples.md +97 -0
- agent_paranoid_android-0.5.0/docs/mcp_generator_design.md +265 -0
- agent_paranoid_android-0.5.0/docs/public_release_checklist.md +62 -0
- agent_paranoid_android-0.5.0/docs/release.md +69 -0
- agent_paranoid_android-0.5.0/docs/roadmap.md +68 -0
- agent_paranoid_android-0.5.0/examples/orders_profile.json +40 -0
- agent_paranoid_android-0.5.0/examples/trino_safe_profile.json +59 -0
- agent_paranoid_android-0.5.0/openspec/changes/README.md +18 -0
- agent_paranoid_android-0.5.0/openspec/changes/_template/design.md +19 -0
- agent_paranoid_android-0.5.0/openspec/changes/_template/proposal.md +28 -0
- agent_paranoid_android-0.5.0/openspec/changes/_template/specs/capability/spec.md +25 -0
- agent_paranoid_android-0.5.0/openspec/changes/_template/tasks.md +10 -0
- agent_paranoid_android-0.5.0/openspec/changes/agent-orchestration/design.md +39 -0
- agent_paranoid_android-0.5.0/openspec/changes/agent-orchestration/proposal.md +38 -0
- agent_paranoid_android-0.5.0/openspec/changes/agent-orchestration/specs/agent-orchestration/spec.md +26 -0
- agent_paranoid_android-0.5.0/openspec/changes/agent-orchestration/tasks.md +9 -0
- agent_paranoid_android-0.5.0/openspec/changes/mcp-business-rules/design.md +40 -0
- agent_paranoid_android-0.5.0/openspec/changes/mcp-business-rules/proposal.md +48 -0
- agent_paranoid_android-0.5.0/openspec/changes/mcp-business-rules/specs/safe-mcp-workflow/spec.md +38 -0
- agent_paranoid_android-0.5.0/openspec/changes/mcp-business-rules/tasks.md +10 -0
- agent_paranoid_android-0.5.0/openspec/project.md +43 -0
- agent_paranoid_android-0.5.0/openspec/specs/agent-orchestration/spec.md +73 -0
- agent_paranoid_android-0.5.0/openspec/specs/dataset-validation/spec.md +73 -0
- agent_paranoid_android-0.5.0/openspec/specs/safe-csv-profiling/spec.md +75 -0
- agent_paranoid_android-0.5.0/openspec/specs/safe-mcp-workflow/spec.md +97 -0
- agent_paranoid_android-0.5.0/openspec/specs/synthetic-generation/spec.md +75 -0
- agent_paranoid_android-0.5.0/prompts/developer.md +47 -0
- agent_paranoid_android-0.5.0/prompts/system.md +55 -0
- agent_paranoid_android-0.5.0/prompts/user_template.md +22 -0
- agent_paranoid_android-0.5.0/prompts/user_template_csv.md +24 -0
- agent_paranoid_android-0.5.0/pyproject.toml +102 -0
- agent_paranoid_android-0.5.0/schemas/dataset_spec.schema.json +550 -0
- agent_paranoid_android-0.5.0/scripts/check_installed_package.py +48 -0
- agent_paranoid_android-0.5.0/scripts/check_release.sh +66 -0
- agent_paranoid_android-0.5.0/scripts/check_release_tag.py +39 -0
- agent_paranoid_android-0.5.0/scripts/domain_agnostic_refactor.py +860 -0
- agent_paranoid_android-0.5.0/scripts/export_dataset_schema.py +41 -0
- agent_paranoid_android-0.5.0/scripts/run_ai_demo.py +50 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/__init__.py +75 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/adapters/__init__.py +61 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/adapters/csv_file.py +67 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/adapters/csv_folder.py +82 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/adapters/json_profile.py +111 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/adapters/legacy_generation.py +448 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/adapters/legacy_profile.py +257 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/adapters/parquet_dataset.py +95 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/adapters/trino_profile.py +43 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/agent.py +325 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/business_rules.py +33 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/business_validator.py +9 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/cli.py +468 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/compat/__init__.py +61 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/compat/commands.py +56 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/compat/legacy_generation.py +39 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/compat/legacy_outputs.py +53 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/compat/legacy_spec.py +22 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/compat/legacy_workflows.py +85 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/__init__.py +76 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/constraint.py +66 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/dataset.py +126 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/distribution.py +178 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/entity.py +62 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/field.py +73 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/limits.py +307 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/privacy.py +221 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/relationship.py +22 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/serialization.py +39 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/core/settings.py +41 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/csv_profiler.py +445 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/generation/__init__.py +7 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/generation/constraint_solver.py +165 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/generation/entity_generator.py +265 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/generation/planner.py +41 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/generator.py +152 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/io/__init__.py +92 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/io/artifacts.py +165 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/io/commands.py +338 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/io/legacy_workflows.py +11 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/io/readers.py +69 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/io/workflows.py +554 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/io/writers.py +156 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/mcp_generator_server.py +403 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/mcp_trino_server.py +1051 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/profiling/__init__.py +49 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/profiling/cache.py +85 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/profiling/constraint_miner.py +165 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/profiling/distribution_profiler.py +83 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/profiling/relationship_profiler.py +53 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/profiling/schema_profiler.py +325 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/py.typed +1 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/rules/__init__.py +33 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/rules/business_config.py +106 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/rules/conditions.py +37 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/rules/contract.py +365 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/rules/engine.py +157 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/rules/expressions.py +148 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/rules/models.py +210 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/rules/scenarios.py +32 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/rules/validation.py +184 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/rules_engine.py +6 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/safety.py +128 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/scenario.py +5 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/spec.py +355 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/validation/__init__.py +5 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/validation/constraint_validator.py +123 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/validation/reconciliation.py +40 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/validation/relationship_validator.py +34 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/validation/schema_validator.py +67 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/validator.py +129 -0
- agent_paranoid_android-0.5.0/src/test_data_agent/version.py +3 -0
- agent_paranoid_android-0.5.0/tests/fixtures/customers.csv +6 -0
- agent_paranoid_android-0.5.0/tests/fixtures/example_dataset/customers.csv +4 -0
- agent_paranoid_android-0.5.0/tests/fixtures/example_dataset/orders.csv +5 -0
- agent_paranoid_android-0.5.0/tests/fixtures/privacy_detection_cases.json +109 -0
- agent_paranoid_android-0.5.0/tests/integration/test_trino_integration.py +49 -0
- agent_paranoid_android-0.5.0/tests/snapshots/masked_row.json +5 -0
- agent_paranoid_android-0.5.0/tests/test_agent.py +121 -0
- agent_paranoid_android-0.5.0/tests/test_ai_trino_workflow.py +48 -0
- agent_paranoid_android-0.5.0/tests/test_business_rules.py +562 -0
- agent_paranoid_android-0.5.0/tests/test_cli.py +763 -0
- agent_paranoid_android-0.5.0/tests/test_compat_legacy.py +48 -0
- agent_paranoid_android-0.5.0/tests/test_constraint_miner.py +35 -0
- agent_paranoid_android-0.5.0/tests/test_constraint_solver.py +225 -0
- agent_paranoid_android-0.5.0/tests/test_constraint_validator.py +88 -0
- agent_paranoid_android-0.5.0/tests/test_csv_profiler.py +221 -0
- agent_paranoid_android-0.5.0/tests/test_dataset_spec_contract.py +578 -0
- agent_paranoid_android-0.5.0/tests/test_domain_agnostic_pipeline.py +285 -0
- agent_paranoid_android-0.5.0/tests/test_domain_agnostic_refactor_script.py +779 -0
- agent_paranoid_android-0.5.0/tests/test_generator.py +228 -0
- agent_paranoid_android-0.5.0/tests/test_io_commands.py +535 -0
- agent_paranoid_android-0.5.0/tests/test_io_workflows.py +500 -0
- agent_paranoid_android-0.5.0/tests/test_limits.py +67 -0
- agent_paranoid_android-0.5.0/tests/test_mcp_generator_server.py +592 -0
- agent_paranoid_android-0.5.0/tests/test_mcp_trino_server.py +687 -0
- agent_paranoid_android-0.5.0/tests/test_privacy_corpus.py +50 -0
- agent_paranoid_android-0.5.0/tests/test_property_safety.py +50 -0
- agent_paranoid_android-0.5.0/tests/test_release_artifacts.py +183 -0
- agent_paranoid_android-0.5.0/tests/test_safety.py +148 -0
- agent_paranoid_android-0.5.0/tests/test_source_adapters.py +483 -0
- agent_paranoid_android-0.5.0/tests/test_version.py +10 -0
- agent_paranoid_android-0.5.0/uv.lock +2042 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report incorrect behavior using synthetic reproduction data.
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for reporting a bug. Do not include secrets, raw PII, production rows, or internal hostnames.
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: summary
|
|
12
|
+
attributes:
|
|
13
|
+
label: Summary
|
|
14
|
+
description: What happened?
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
- type: textarea
|
|
18
|
+
id: reproduce
|
|
19
|
+
attributes:
|
|
20
|
+
label: Reproduction
|
|
21
|
+
description: Use minimal synthetic data and exact commands when possible.
|
|
22
|
+
placeholder: |
|
|
23
|
+
1. Create synthetic fixture ...
|
|
24
|
+
2. Run ...
|
|
25
|
+
3. Observe ...
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: textarea
|
|
29
|
+
id: expected
|
|
30
|
+
attributes:
|
|
31
|
+
label: Expected Behavior
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: textarea
|
|
35
|
+
id: actual
|
|
36
|
+
attributes:
|
|
37
|
+
label: Actual Behavior
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
40
|
+
- type: dropdown
|
|
41
|
+
id: safety
|
|
42
|
+
attributes:
|
|
43
|
+
label: Safety Impact
|
|
44
|
+
options:
|
|
45
|
+
- No known safety impact
|
|
46
|
+
- Possible source-row copying
|
|
47
|
+
- Possible raw PII exposure
|
|
48
|
+
- Possible unsafe SQL acceptance
|
|
49
|
+
- Possible workspace/path escape
|
|
50
|
+
- Other safety concern
|
|
51
|
+
validations:
|
|
52
|
+
required: true
|
|
53
|
+
- type: input
|
|
54
|
+
id: version
|
|
55
|
+
attributes:
|
|
56
|
+
label: Version Or Commit
|
|
57
|
+
placeholder: "0.3.0 or commit SHA"
|
|
58
|
+
- type: textarea
|
|
59
|
+
id: environment
|
|
60
|
+
attributes:
|
|
61
|
+
label: Environment
|
|
62
|
+
placeholder: "Python version, OS, install method"
|
|
63
|
+
- type: textarea
|
|
64
|
+
id: logs
|
|
65
|
+
attributes:
|
|
66
|
+
label: Logs
|
|
67
|
+
description: Paste sanitized logs only.
|
|
68
|
+
render: text
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Security vulnerability
|
|
4
|
+
url: https://github.com/wa-pis/agent-paranoid-android/security/advisories/new
|
|
5
|
+
about: Please report vulnerabilities privately. Do not post secrets, raw PII, or exploit details in public issues.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest a scoped improvement or new capability.
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Please keep requests safety-focused. Do not include production data, raw PII, secrets, or internal schema details.
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: problem
|
|
12
|
+
attributes:
|
|
13
|
+
label: Problem
|
|
14
|
+
description: What user or production-readiness problem should this solve?
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
- type: textarea
|
|
18
|
+
id: proposal
|
|
19
|
+
attributes:
|
|
20
|
+
label: Proposal
|
|
21
|
+
description: What should change?
|
|
22
|
+
validations:
|
|
23
|
+
required: true
|
|
24
|
+
- type: dropdown
|
|
25
|
+
id: area
|
|
26
|
+
attributes:
|
|
27
|
+
label: Area
|
|
28
|
+
options:
|
|
29
|
+
- CSV profiling
|
|
30
|
+
- Trino MCP
|
|
31
|
+
- Generator MCP
|
|
32
|
+
- DatasetSpec
|
|
33
|
+
- Deterministic generation
|
|
34
|
+
- Validation
|
|
35
|
+
- Agent workflow
|
|
36
|
+
- Documentation
|
|
37
|
+
- Release/security
|
|
38
|
+
- Other
|
|
39
|
+
validations:
|
|
40
|
+
required: true
|
|
41
|
+
- type: textarea
|
|
42
|
+
id: safety
|
|
43
|
+
attributes:
|
|
44
|
+
label: Safety Considerations
|
|
45
|
+
description: How should this preserve no-copy, no-PII, read-only SQL, and deterministic-generation guarantees?
|
|
46
|
+
validations:
|
|
47
|
+
required: true
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
-
|
|
4
|
+
|
|
5
|
+
## Safety Checklist
|
|
6
|
+
|
|
7
|
+
- [ ] The change does not copy source rows into generated output.
|
|
8
|
+
- [ ] The change does not expose raw PII, secrets, or production data.
|
|
9
|
+
- [ ] Trino-facing changes keep SQL read-only, allowlisted, and bounded.
|
|
10
|
+
- [ ] Generated data remains reproducible when a seed is supplied.
|
|
11
|
+
- [ ] New fixtures, examples, logs, and docs use synthetic data only.
|
|
12
|
+
|
|
13
|
+
## Validation
|
|
14
|
+
|
|
15
|
+
- [ ] `python3 -m ruff check src tests scripts`
|
|
16
|
+
- [ ] `python3 -m compileall -q src tests scripts`
|
|
17
|
+
- [ ] `python3 -m pytest`
|
|
18
|
+
- [ ] `scripts/check_release.sh`
|
|
19
|
+
|
|
20
|
+
Explain any unchecked item:
|
|
21
|
+
|
|
22
|
+
-
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "pip"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
open-pull-requests-limit: 5
|
|
8
|
+
labels:
|
|
9
|
+
- "dependencies"
|
|
10
|
+
- "python"
|
|
11
|
+
commit-message:
|
|
12
|
+
prefix: "chore"
|
|
13
|
+
include: "scope"
|
|
14
|
+
|
|
15
|
+
- package-ecosystem: "github-actions"
|
|
16
|
+
directory: "/"
|
|
17
|
+
schedule:
|
|
18
|
+
interval: "weekly"
|
|
19
|
+
open-pull-requests-limit: 5
|
|
20
|
+
labels:
|
|
21
|
+
- "dependencies"
|
|
22
|
+
- "github-actions"
|
|
23
|
+
commit-message:
|
|
24
|
+
prefix: "chore"
|
|
25
|
+
include: "scope"
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
quality:
|
|
17
|
+
name: Python ${{ matrix.python-version }}
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
python-version: ["3.11", "3.12"]
|
|
23
|
+
steps:
|
|
24
|
+
- name: Check out repository
|
|
25
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: Set up uv
|
|
33
|
+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
|
|
34
|
+
with:
|
|
35
|
+
version: "0.11.23"
|
|
36
|
+
enable-cache: true
|
|
37
|
+
|
|
38
|
+
- name: Install locked development environment
|
|
39
|
+
run: |
|
|
40
|
+
uv sync --frozen --extra dev --python python --no-install-project
|
|
41
|
+
uv sync --frozen --extra dev --python python --no-editable --no-build-isolation
|
|
42
|
+
|
|
43
|
+
- name: Audit Python dependencies
|
|
44
|
+
run: |
|
|
45
|
+
uv export --quiet --frozen --extra dev --no-emit-project --output-file /tmp/audit-requirements.txt
|
|
46
|
+
uv run --no-sync python -m pip_audit --require-hashes --requirement /tmp/audit-requirements.txt
|
|
47
|
+
|
|
48
|
+
- name: Run lint checks
|
|
49
|
+
run: uv run --no-sync python -m ruff check src tests
|
|
50
|
+
|
|
51
|
+
- name: Run static type checks
|
|
52
|
+
run: uv run --no-sync python -m mypy
|
|
53
|
+
|
|
54
|
+
- name: Compile source and tests
|
|
55
|
+
run: uv run --no-sync python -m compileall -q src tests
|
|
56
|
+
|
|
57
|
+
- name: Run tests with coverage gate
|
|
58
|
+
run: >-
|
|
59
|
+
uv run --no-sync python -m pytest
|
|
60
|
+
--cov=test_data_agent
|
|
61
|
+
--cov-report=term-missing
|
|
62
|
+
--cov-fail-under=85
|
|
63
|
+
|
|
64
|
+
package:
|
|
65
|
+
name: Wheel smoke
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
steps:
|
|
68
|
+
- name: Check out repository
|
|
69
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
70
|
+
|
|
71
|
+
- name: Set up Python
|
|
72
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
73
|
+
with:
|
|
74
|
+
python-version: "3.12"
|
|
75
|
+
|
|
76
|
+
- name: Set up uv
|
|
77
|
+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
|
|
78
|
+
with:
|
|
79
|
+
version: "0.11.23"
|
|
80
|
+
enable-cache: true
|
|
81
|
+
|
|
82
|
+
- name: Install locked build environment
|
|
83
|
+
run: |
|
|
84
|
+
uv sync --frozen --extra dev --python python --no-install-project
|
|
85
|
+
uv sync --frozen --extra dev --python python --no-editable --no-build-isolation
|
|
86
|
+
|
|
87
|
+
- name: Build wheel and source distribution
|
|
88
|
+
run: uv build --no-build-isolation
|
|
89
|
+
|
|
90
|
+
- name: Verify installed wheel
|
|
91
|
+
run: |
|
|
92
|
+
uv run --isolated --no-project --with ./dist/*.whl python scripts/check_installed_package.py
|
|
93
|
+
uv run --isolated --no-project --with ./dist/*.whl test-data-agent doctor --skip-smoke
|
|
94
|
+
|
|
95
|
+
trino-integration:
|
|
96
|
+
name: Trino integration
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
services:
|
|
99
|
+
trino:
|
|
100
|
+
image: trinodb/trino:483@sha256:db58cc93e593a2706553745f276bb119c9810e69918be56ecde088ba7ccb0534
|
|
101
|
+
ports:
|
|
102
|
+
- 8080:8080
|
|
103
|
+
options: >-
|
|
104
|
+
--health-cmd /usr/lib/trino/bin/health-check
|
|
105
|
+
--health-interval 10s
|
|
106
|
+
--health-timeout 5s
|
|
107
|
+
--health-retries 12
|
|
108
|
+
env:
|
|
109
|
+
TEST_TRINO_INTEGRATION: "1"
|
|
110
|
+
TRINO_HOST: localhost
|
|
111
|
+
TRINO_PORT: "8080"
|
|
112
|
+
TRINO_USER: integration_test
|
|
113
|
+
TRINO_HTTP_SCHEME: http
|
|
114
|
+
TRINO_ALLOW_INSECURE_HTTP: "true"
|
|
115
|
+
TRINO_ALLOWED_CATALOGS: tpch
|
|
116
|
+
TRINO_ALLOWED_SCHEMAS: tiny
|
|
117
|
+
TRINO_REQUEST_TIMEOUT_SECONDS: "30"
|
|
118
|
+
TRINO_MAX_RESULT_ROWS: "100"
|
|
119
|
+
TRINO_QUERY_MAX_EXECUTION_TIME: 30s
|
|
120
|
+
TRINO_QUERY_MAX_RUN_TIME: 45s
|
|
121
|
+
TRINO_QUERY_MAX_SCAN_PHYSICAL_BYTES: 64MB
|
|
122
|
+
steps:
|
|
123
|
+
- name: Check out repository
|
|
124
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
125
|
+
|
|
126
|
+
- name: Set up Python
|
|
127
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
128
|
+
with:
|
|
129
|
+
python-version: "3.12"
|
|
130
|
+
|
|
131
|
+
- name: Set up uv
|
|
132
|
+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
|
|
133
|
+
with:
|
|
134
|
+
version: "0.11.23"
|
|
135
|
+
enable-cache: true
|
|
136
|
+
|
|
137
|
+
- name: Install locked development environment
|
|
138
|
+
run: |
|
|
139
|
+
uv sync --frozen --extra dev --python python --no-install-project
|
|
140
|
+
uv sync --frozen --extra dev --python python --no-editable --no-build-isolation
|
|
141
|
+
|
|
142
|
+
- name: Run live Trino integration tests
|
|
143
|
+
run: >-
|
|
144
|
+
uv run --no-sync python -m pytest
|
|
145
|
+
-m integration
|
|
146
|
+
tests/integration/test_trino_integration.py
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: release-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: false
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
name: Build, attest, and release
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
contents: write
|
|
18
|
+
id-token: write
|
|
19
|
+
attestations: write
|
|
20
|
+
artifact-metadata: write
|
|
21
|
+
steps:
|
|
22
|
+
- name: Check out tagged source
|
|
23
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
24
|
+
with:
|
|
25
|
+
persist-credentials: false
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.12"
|
|
31
|
+
|
|
32
|
+
- name: Set up uv
|
|
33
|
+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
|
|
34
|
+
with:
|
|
35
|
+
version: "0.11.23"
|
|
36
|
+
enable-cache: true
|
|
37
|
+
|
|
38
|
+
- name: Install locked release environment
|
|
39
|
+
run: |
|
|
40
|
+
uv sync --frozen --extra dev --python python --no-install-project
|
|
41
|
+
uv sync --frozen --extra dev --python python --no-editable --no-build-isolation
|
|
42
|
+
|
|
43
|
+
- name: Verify tag matches package version
|
|
44
|
+
run: uv run --no-sync python scripts/check_release_tag.py "${GITHUB_REF_NAME}"
|
|
45
|
+
|
|
46
|
+
- name: Run release gate
|
|
47
|
+
run: uv run --no-sync scripts/check_release.sh
|
|
48
|
+
|
|
49
|
+
- name: Build wheel and source distribution
|
|
50
|
+
run: uv build --no-build-isolation
|
|
51
|
+
|
|
52
|
+
- name: Verify installed wheel
|
|
53
|
+
run: |
|
|
54
|
+
uv run --isolated --no-project --with ./dist/*.whl python scripts/check_installed_package.py
|
|
55
|
+
uv run --isolated --no-project --with ./dist/*.whl test-data-agent doctor --skip-smoke
|
|
56
|
+
|
|
57
|
+
- name: Export CycloneDX SBOM from lockfile
|
|
58
|
+
run: >-
|
|
59
|
+
uv export
|
|
60
|
+
--frozen
|
|
61
|
+
--no-dev
|
|
62
|
+
--format cyclonedx1.5
|
|
63
|
+
--preview-features sbom-export
|
|
64
|
+
--quiet
|
|
65
|
+
--output-file dist/sbom.cdx.json
|
|
66
|
+
|
|
67
|
+
- name: Write artifact checksums
|
|
68
|
+
run: sha256sum dist/*.whl dist/*.tar.gz dist/sbom.cdx.json > dist/SHA256SUMS
|
|
69
|
+
|
|
70
|
+
- name: Attest build provenance
|
|
71
|
+
uses: actions/attest@f7c74d28b9d84cb8768d0b8ca14a4bac6ef463e6 # v4
|
|
72
|
+
with:
|
|
73
|
+
subject-path: |
|
|
74
|
+
dist/*.whl
|
|
75
|
+
dist/*.tar.gz
|
|
76
|
+
|
|
77
|
+
- name: Attest package SBOM
|
|
78
|
+
uses: actions/attest@f7c74d28b9d84cb8768d0b8ca14a4bac6ef463e6 # v4
|
|
79
|
+
with:
|
|
80
|
+
subject-path: |
|
|
81
|
+
dist/*.whl
|
|
82
|
+
dist/*.tar.gz
|
|
83
|
+
sbom-path: dist/sbom.cdx.json
|
|
84
|
+
|
|
85
|
+
- name: Preserve release artifacts
|
|
86
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
87
|
+
with:
|
|
88
|
+
name: release-${{ github.ref_name }}
|
|
89
|
+
path: |
|
|
90
|
+
dist/*.whl
|
|
91
|
+
dist/*.tar.gz
|
|
92
|
+
dist/sbom.cdx.json
|
|
93
|
+
dist/SHA256SUMS
|
|
94
|
+
if-no-files-found: error
|
|
95
|
+
|
|
96
|
+
- name: Create GitHub Release
|
|
97
|
+
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3
|
|
98
|
+
with:
|
|
99
|
+
files: |
|
|
100
|
+
dist/*.whl
|
|
101
|
+
dist/*.tar.gz
|
|
102
|
+
dist/sbom.cdx.json
|
|
103
|
+
dist/SHA256SUMS
|
|
104
|
+
fail_on_unmatched_files: true
|
|
105
|
+
generate_release_notes: true
|
|
106
|
+
make_latest: true
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Security
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "17 4 * * 1"
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: security-${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
dependency-review:
|
|
17
|
+
name: Dependency review
|
|
18
|
+
if: github.event_name == 'pull_request'
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
steps:
|
|
23
|
+
- name: Check out repository
|
|
24
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
25
|
+
|
|
26
|
+
- name: Review dependency changes
|
|
27
|
+
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
|
|
28
|
+
with:
|
|
29
|
+
fail-on-severity: moderate
|
|
30
|
+
|
|
31
|
+
codeql:
|
|
32
|
+
name: CodeQL
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
permissions:
|
|
35
|
+
contents: read
|
|
36
|
+
security-events: write
|
|
37
|
+
steps:
|
|
38
|
+
- name: Check out repository
|
|
39
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
40
|
+
|
|
41
|
+
- name: Initialize CodeQL
|
|
42
|
+
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
|
|
43
|
+
with:
|
|
44
|
+
languages: python
|
|
45
|
+
queries: security-extended
|
|
46
|
+
|
|
47
|
+
- name: Analyze
|
|
48
|
+
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
|
|
49
|
+
|
|
50
|
+
secrets:
|
|
51
|
+
name: Secret history scan
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
permissions:
|
|
54
|
+
contents: read
|
|
55
|
+
steps:
|
|
56
|
+
- name: Check out complete history
|
|
57
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
58
|
+
with:
|
|
59
|
+
fetch-depth: 0
|
|
60
|
+
|
|
61
|
+
- name: Scan repository history
|
|
62
|
+
uses: gitleaks/gitleaks-action@e0c47f4f8be36e29cdc102c57e68cb5cbf0e8d1e # v3
|
|
63
|
+
env:
|
|
64
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
65
|
+
GITLEAKS_ENABLE_COMMENTS: "false"
|
|
66
|
+
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: "false"
|