engineering-platform 2.2.0__py3-none-any.whl
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.
- engineering_platform/ENGINEERING_PLATFORM_CONFIG.json +32 -0
- engineering_platform/ENGINEERING_PLATFORM_VERSION.json +15 -0
- engineering_platform/__init__.py +1 -0
- engineering_platform/__main__.py +7 -0
- engineering_platform/agent_state.py +530 -0
- engineering_platform/agent_trust.py +174 -0
- engineering_platform/assets/dashboard.css +1317 -0
- engineering_platform/assets/dashboard.js +8534 -0
- engineering_platform/assets/dashboard_locales.mjs +4049 -0
- engineering_platform/assets/dashboard_status_store.mjs +41 -0
- engineering_platform/assets/operations-console/apple-touch-icon-dark.png +0 -0
- engineering_platform/assets/operations-console/apple-touch-icon-light.png +0 -0
- engineering_platform/assets/operations-console/icon-dark.png +0 -0
- engineering_platform/assets/operations-console/icon-light.png +0 -0
- engineering_platform/assets/operations-console/icon-transparent.png +0 -0
- engineering_platform/assets/operations-console/manifest.webmanifest +11 -0
- engineering_platform/capability_preflight.py +285 -0
- engineering_platform/capability_review.py +261 -0
- engineering_platform/central_data_transfer.py +195 -0
- engineering_platform/central_database.py +245 -0
- engineering_platform/central_store_migration.py +1672 -0
- engineering_platform/codex_capacity.py +81 -0
- engineering_platform/codex_chat.py +226 -0
- engineering_platform/codex_observability.py +153 -0
- engineering_platform/component_lock.py +40 -0
- engineering_platform/component_logging.py +420 -0
- engineering_platform/console_presentation.py +14 -0
- engineering_platform/console_route_ownership.py +83 -0
- engineering_platform/contracts/__init__.py +38 -0
- engineering_platform/contracts/ep_consumer.py +391 -0
- engineering_platform/contracts/models.py +105 -0
- engineering_platform/contracts/projection.py +401 -0
- engineering_platform/dashboard_browser_validation.py +206 -0
- engineering_platform/dashboard_state.py +630 -0
- engineering_platform/dashboard_supervisor.swift +105 -0
- engineering_platform/dashboard_translation.py +129 -0
- engineering_platform/dependabot_producer.py +349 -0
- engineering_platform/drift_diagnostics.py +144 -0
- engineering_platform/emergency_recovery.py +268 -0
- engineering_platform/engineering_memory.py +139 -0
- engineering_platform/ep_consumer_credentials.py +473 -0
- engineering_platform/evidence_projection.py +213 -0
- engineering_platform/execution_activity.py +218 -0
- engineering_platform/execution_context.py +132 -0
- engineering_platform/execution_errors.py +42 -0
- engineering_platform/execution_evidence.py +24 -0
- engineering_platform/execution_executor.py +730 -0
- engineering_platform/execution_finalization.py +44 -0
- engineering_platform/execution_host.py +3306 -0
- engineering_platform/execution_lease.py +365 -0
- engineering_platform/execution_lifecycle.py +447 -0
- engineering_platform/execution_models.py +43 -0
- engineering_platform/execution_readiness.py +166 -0
- engineering_platform/execution_reporting.py +1607 -0
- engineering_platform/execution_repository.py +253 -0
- engineering_platform/execution_timeout_policy.py +56 -0
- engineering_platform/execution_timing.py +440 -0
- engineering_platform/execution_transaction.py +28 -0
- engineering_platform/external_producer_binding.py +235 -0
- engineering_platform/file_inbox.py +249 -0
- engineering_platform/forensic_attribution.py +338 -0
- engineering_platform/forensic_attribution_v2.py +134 -0
- engineering_platform/forensic_delta.py +299 -0
- engineering_platform/golden_scenario.py +63 -0
- engineering_platform/historical_dashboard_configuration.py +171 -0
- engineering_platform/host_admin.py +199 -0
- engineering_platform/host_preflight.py +231 -0
- engineering_platform/installation_relocation.py +122 -0
- engineering_platform/investigation_ledger.py +89 -0
- engineering_platform/legacy_inbox_migration.py +79 -0
- engineering_platform/lifecycle_worker.py +223 -0
- engineering_platform/live_status.py +267 -0
- engineering_platform/local_api.py +209 -0
- engineering_platform/local_api_keychain.py +51 -0
- engineering_platform/local_repository_binding.py +138 -0
- engineering_platform/managed_autonomy.py +509 -0
- engineering_platform/managed_codex_runtime.py +105 -0
- engineering_platform/parity_context.py +203 -0
- engineering_platform/parity_lifecycle_dispatcher.py +488 -0
- engineering_platform/platform_admin.py +13 -0
- engineering_platform/platform_api.py +428 -0
- engineering_platform/platform_bootstrap.py +385 -0
- engineering_platform/platform_components.py +65 -0
- engineering_platform/platform_version.py +171 -0
- engineering_platform/pr_check_repair.py +276 -0
- engineering_platform/pr_evidence_backfill.py +278 -0
- engineering_platform/producer.py +209 -0
- engineering_platform/project_agent.py +366 -0
- engineering_platform/project_agent_service.py +244 -0
- engineering_platform/project_topology.py +126 -0
- engineering_platform/prompt_history.py +591 -0
- engineering_platform/provider_context.py +136 -0
- engineering_platform/provider_context_benchmark.py +41 -0
- engineering_platform/provider_context_scope.py +90 -0
- engineering_platform/provider_interruption.py +168 -0
- engineering_platform/provider_process_identity.py +80 -0
- engineering_platform/provider_readiness.py +138 -0
- engineering_platform/provider_recovery.py +647 -0
- engineering_platform/provider_usage.py +497 -0
- engineering_platform/providers.py +471 -0
- engineering_platform/qualification.py +220 -0
- engineering_platform/recommendation_handoff.py +238 -0
- engineering_platform/report_analysis.py +193 -0
- engineering_platform/repository_attachment.py +171 -0
- engineering_platform/repository_handoff.py +95 -0
- engineering_platform/resources.py +38 -0
- engineering_platform/reviewer_evidence.py +70 -0
- engineering_platform/schemas/repository-attachment.schema.json +61 -0
- engineering_platform/server.py +3679 -0
- engineering_platform/server_console_services.py +2024 -0
- engineering_platform/server_relay.py +172 -0
- engineering_platform/server_service.py +122 -0
- engineering_platform/status_model.py +135 -0
- engineering_platform/status_reconciliation.py +34 -0
- engineering_platform/storage.py +2440 -0
- engineering_platform/submission_cli.py +77 -0
- engineering_platform/submission_intake.py +45 -0
- engineering_platform/submission_service.py +317 -0
- engineering_platform/telemetry.py +951 -0
- engineering_platform/templates/workspace-config.json +25 -0
- engineering_platform/validation_identity.py +50 -0
- engineering_platform/validation_profile.py +211 -0
- engineering_platform/workspace_preflight.py +263 -0
- engineering_platform/worktree_provenance.py +147 -0
- engineering_platform/worktree_tooling.py +18 -0
- engineering_platform-2.2.0.dist-info/METADATA +18 -0
- engineering_platform-2.2.0.dist-info/RECORD +130 -0
- engineering_platform-2.2.0.dist-info/WHEEL +5 -0
- engineering_platform-2.2.0.dist-info/entry_points.txt +6 -0
- engineering_platform-2.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""Generate reviewable, sanitized repository run-handoff records."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from datetime import datetime, timezone
|
|
6
|
+
import argparse
|
|
7
|
+
import json
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
from .agent_state import redact_diagnostic
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def publish(
|
|
14
|
+
root: Path,
|
|
15
|
+
*,
|
|
16
|
+
run_id: str,
|
|
17
|
+
platform_version: str,
|
|
18
|
+
implementation_pr: int,
|
|
19
|
+
finalization_pr: int,
|
|
20
|
+
objective: str = "Engineering transaction",
|
|
21
|
+
) -> Path:
|
|
22
|
+
"""Publish only durable completion metadata after a successful finalization."""
|
|
23
|
+
directory = root / "docs" / "engineering" / "runs" / str(datetime.now(timezone.utc).year)
|
|
24
|
+
directory.mkdir(parents=True, exist_ok=True)
|
|
25
|
+
stamp = datetime.now(timezone.utc)
|
|
26
|
+
relative = directory / f"{stamp.date().isoformat()}-{run_id}.md"
|
|
27
|
+
body = "\n".join(
|
|
28
|
+
(
|
|
29
|
+
"# Engineering Run Handoff",
|
|
30
|
+
"",
|
|
31
|
+
f"- Engineering Platform: `{platform_version}`",
|
|
32
|
+
f"- Run ID: `{run_id}`",
|
|
33
|
+
f"- Completed: `{stamp.isoformat()}`",
|
|
34
|
+
f"- Objective: {redact_diagnostic(objective)}",
|
|
35
|
+
f"- Implementation PR: `#{implementation_pr}`",
|
|
36
|
+
f"- Finalization PR: `#{finalization_pr}`",
|
|
37
|
+
"- Repository State: `MERGED_RECONCILED`",
|
|
38
|
+
"- Workspace State: `WORKSPACE_READY`",
|
|
39
|
+
"",
|
|
40
|
+
"## Platform Architect Handoff",
|
|
41
|
+
"",
|
|
42
|
+
"- Recommended next capability: repository-evidence-based selection by the Product & Platform Architect.",
|
|
43
|
+
"- Architect attention: no remote authority, release, deployment or publication authority was added.",
|
|
44
|
+
"- Qualification summary: validate the completed increment before relying on it.",
|
|
45
|
+
"",
|
|
46
|
+
)
|
|
47
|
+
)
|
|
48
|
+
relative.write_text(body, encoding="utf-8")
|
|
49
|
+
latest = root / "docs" / "engineering" / "runs" / "latest.md"
|
|
50
|
+
latest.write_text(
|
|
51
|
+
f"# Latest Engineering Run\n\n- Run ID: `{run_id}`\n- Engineering Platform: `{platform_version}`\n- Implementation PR: `#{implementation_pr}`\n- Finalization PR: `#{finalization_pr}`\n- Repository State: `MERGED_RECONCILED`\n- Workspace State: `WORKSPACE_READY`\n- Handoff: `{relative.relative_to(root)}`\n",
|
|
52
|
+
encoding="utf-8",
|
|
53
|
+
)
|
|
54
|
+
index = {
|
|
55
|
+
"schema_version": 1,
|
|
56
|
+
"latest_run_id": run_id,
|
|
57
|
+
"completed_at": stamp.isoformat(),
|
|
58
|
+
"platform_version": platform_version,
|
|
59
|
+
"report_path": str(relative.relative_to(root)),
|
|
60
|
+
"implementation_pr": implementation_pr,
|
|
61
|
+
"finalization_pr": finalization_pr,
|
|
62
|
+
"repository_state": "MERGED_RECONCILED",
|
|
63
|
+
"workspace_state": "WORKSPACE_READY",
|
|
64
|
+
}
|
|
65
|
+
(root / "docs" / "engineering" / "runs" / "index.json").write_text(
|
|
66
|
+
json.dumps(index, indent=2, sort_keys=True) + "\n", encoding="utf-8"
|
|
67
|
+
)
|
|
68
|
+
return relative
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def main(argv: list[str] | None = None) -> int:
|
|
72
|
+
"""Write the handoff record on the Finalization PR branch before merge."""
|
|
73
|
+
parser = argparse.ArgumentParser(
|
|
74
|
+
prog="engineering-repository-handoff",
|
|
75
|
+
description="Publish durable Engineering Platform Finalization handoff records.",
|
|
76
|
+
)
|
|
77
|
+
parser.add_argument("--run-id", required=True)
|
|
78
|
+
parser.add_argument("--platform-version", required=True)
|
|
79
|
+
parser.add_argument("--implementation-pr", required=True, type=int)
|
|
80
|
+
parser.add_argument("--finalization-pr", required=True, type=int)
|
|
81
|
+
parser.add_argument("--root", type=Path, default=Path.cwd())
|
|
82
|
+
args = parser.parse_args(argv)
|
|
83
|
+
handoff = publish(
|
|
84
|
+
args.root.resolve(),
|
|
85
|
+
run_id=args.run_id,
|
|
86
|
+
platform_version=args.platform_version,
|
|
87
|
+
implementation_pr=args.implementation_pr,
|
|
88
|
+
finalization_pr=args.finalization_pr,
|
|
89
|
+
)
|
|
90
|
+
print(handoff)
|
|
91
|
+
return 0
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
if __name__ == "__main__":
|
|
95
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Access to resources owned by the installed Engineering Platform package.
|
|
2
|
+
|
|
3
|
+
Project roots contain consumer-owned state. They are never used to locate
|
|
4
|
+
Engineering Platform defaults or metadata.
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
from importlib.resources import files
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class PackageResourceError(FileNotFoundError):
|
|
13
|
+
"""Raised when a required Engineering Platform package resource is absent."""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def package_text(name: str) -> str:
|
|
17
|
+
"""Read one required UTF-8 resource from the installed package.
|
|
18
|
+
|
|
19
|
+
This deliberately has no checkout, working-directory, or project-root
|
|
20
|
+
fallback. A missing resource is an invalid package installation.
|
|
21
|
+
"""
|
|
22
|
+
resource = files("engineering_platform").joinpath(name)
|
|
23
|
+
if not resource.is_file():
|
|
24
|
+
raise PackageResourceError(f"Engineering Platform package resource is missing: {name}")
|
|
25
|
+
return resource.read_text(encoding="utf-8")
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def package_path(name: str) -> Path:
|
|
29
|
+
"""Return a filesystem path for one required installed package resource.
|
|
30
|
+
|
|
31
|
+
Engineering Platform wheels are installed as regular package directories;
|
|
32
|
+
callers which require a path therefore receive the package-owned path,
|
|
33
|
+
never a path inferred from a project checkout.
|
|
34
|
+
"""
|
|
35
|
+
resource = files("engineering_platform").joinpath(name)
|
|
36
|
+
if not resource.is_file():
|
|
37
|
+
raise PackageResourceError(f"Engineering Platform package resource is missing: {name}")
|
|
38
|
+
return Path(resource)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""Bounded, run-scoped repository facts for independent reviewer prompts."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
|
|
7
|
+
from .execution_models import RepositoryEvidence
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass(frozen=True)
|
|
11
|
+
class ReviewerEvidence:
|
|
12
|
+
"""A minimal post-synchronization fact set, valid for one reviewer wave.
|
|
13
|
+
|
|
14
|
+
The Execution Host creates this after its repository synchronization while
|
|
15
|
+
holding the run lease. It contains facts, never command output or
|
|
16
|
+
conclusions. A caller must create a new instance after any repository,
|
|
17
|
+
validation, PR, merge, finalization, or cleanup boundary.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
run_id: str
|
|
21
|
+
repository: str
|
|
22
|
+
execution_mode: str
|
|
23
|
+
branch: str
|
|
24
|
+
head_sha: str
|
|
25
|
+
worktree: str
|
|
26
|
+
main_contains_head: bool
|
|
27
|
+
freshness_boundary: str = "post_synchronization_pre_reviewer_wave"
|
|
28
|
+
|
|
29
|
+
@classmethod
|
|
30
|
+
def from_repository(
|
|
31
|
+
cls, run_id: str, execution_mode: str, evidence: RepositoryEvidence
|
|
32
|
+
) -> "ReviewerEvidence":
|
|
33
|
+
return cls(
|
|
34
|
+
run_id=run_id,
|
|
35
|
+
repository=evidence.repository,
|
|
36
|
+
execution_mode=execution_mode,
|
|
37
|
+
branch=evidence.branch,
|
|
38
|
+
head_sha=evidence.head_sha,
|
|
39
|
+
worktree="clean" if evidence.clean else "dirty",
|
|
40
|
+
main_contains_head=evidence.main_contains_head,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def to_dict(self) -> dict[str, object]:
|
|
44
|
+
# Keep the wire projection deliberately explicit about freshness. The
|
|
45
|
+
# data class stays flat so callers cannot accidentally substitute a
|
|
46
|
+
# mutable observation for a run-stable identity field.
|
|
47
|
+
return {
|
|
48
|
+
"run_id": self.run_id,
|
|
49
|
+
"run_stable": {
|
|
50
|
+
"repository": self.repository,
|
|
51
|
+
"execution_mode": self.execution_mode,
|
|
52
|
+
},
|
|
53
|
+
"mutable": {
|
|
54
|
+
"branch": self.branch,
|
|
55
|
+
"head_sha": self.head_sha,
|
|
56
|
+
"worktree": self.worktree,
|
|
57
|
+
"main_contains_head": self.main_contains_head,
|
|
58
|
+
},
|
|
59
|
+
"boundary_sensitive": {
|
|
60
|
+
"freshness_boundary": self.freshness_boundary,
|
|
61
|
+
"invalidated_by": (
|
|
62
|
+
"repository_mutation",
|
|
63
|
+
"validation",
|
|
64
|
+
"pull_request_mutation",
|
|
65
|
+
"merge",
|
|
66
|
+
"finalization",
|
|
67
|
+
"repository_cleanup",
|
|
68
|
+
),
|
|
69
|
+
},
|
|
70
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://engineering-platform.dev/schemas/repository-attachment/1.0",
|
|
4
|
+
"title": "Engineering Platform repository attachment",
|
|
5
|
+
"description": "Declarative, repository-local project attachment metadata. It is never executable configuration.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schema_version", "project", "repository", "validation"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema_version": {"const": "1.0"},
|
|
11
|
+
"project": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": ["id", "authority_repository_id"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"id": {"$ref": "#/$defs/identifier"},
|
|
17
|
+
"authority_repository_id": {"$ref": "#/$defs/identifier"}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["id", "role"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"id": {"$ref": "#/$defs/identifier"},
|
|
26
|
+
"role": {"enum": ["authority", "child"]}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"validation": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["kind"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"kind": {"enum": ["command", "script", "workflow", "none"]},
|
|
35
|
+
"entrypoint": {"type": "string", "minLength": 1, "maxLength": 512, "pattern": "^[^\\u0000\\r\\n]+$"},
|
|
36
|
+
"description": {"type": "string", "minLength": 1, "maxLength": 512, "pattern": "^[^\\u0000\\r\\n]+$"}
|
|
37
|
+
},
|
|
38
|
+
"allOf": [
|
|
39
|
+
{"if": {"properties": {"kind": {"const": "none"}}}, "then": {"not": {"required": ["entrypoint"]}}},
|
|
40
|
+
{"if": {"properties": {"kind": {"enum": ["command", "script", "workflow"]}}}, "then": {"required": ["entrypoint"]}}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"requirements": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"properties": {
|
|
47
|
+
"host": {"type": "object", "propertyNames": {"$ref": "#/$defs/metadata_key"}, "additionalProperties": {"type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[^\\u0000\\r\\n]+$"}},
|
|
48
|
+
"tools": {"type": "object", "propertyNames": {"$ref": "#/$defs/metadata_key"}, "additionalProperties": {"type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[^\\u0000\\r\\n]+$"}}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"integrations": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"propertyNames": {"$ref": "#/$defs/metadata_key"},
|
|
54
|
+
"additionalProperties": {"type": "object", "additionalProperties": true}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"$defs": {
|
|
58
|
+
"identifier": {"type": "string", "minLength": 3, "maxLength": 128, "pattern": "^[a-z0-9][a-z0-9._-]*$"},
|
|
59
|
+
"metadata_key": {"type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[a-z][a-z0-9._-]*$"}
|
|
60
|
+
}
|
|
61
|
+
}
|