feat(epic3): deliver the accepted Epic 3 scope through Story 3.17
CI / Rust Checks (pull_request) Failing after 13m41s
CI / UI Checks (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Deploy (pull_request) Skipped
Community Release / release (push) Failing after 13m33s
CI / Rust Checks (pull_request) Failing after 13m41s
CI / UI Checks (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Deploy (pull_request) Skipped
Community Release / release (push) Failing after 13m33s
Recovery delivery of the accumulated, TL-accepted Epic 3 work that had never been
committed to Git (stories 3.6-3.17, see the crank board). Story 3.18 is not accepted
yet and is deliberately excluded: its logging surface, its capability registration,
its oracle projections and its tests are not part of this tree.
Accepted scope
- 3.6 typed static Resource Drafts; 3.7 publication and exact binding of static
Resource Versions; 3.8 MCP discovery/read and revocation of static Resources;
- 3.9 Resource import/export in API and UI plus TLS dependency maintenance;
3.10 REST-backed Resource templates; 3.11 shared REST read runtime and the MCP
revision/capability foundation;
- 3.12 parameterised Prompt Drafts with preview; 3.13 Prompt publication and exact
version binding to Agents; 3.14 MCP prompts; 3.15 Prompt import/export;
- 3.16 composite Prompts with published Resources (dependency content scan plus
dynamic read through the accepted 3.11 runtime, admin preview and MCP prompts/get);
- 3.17 bounded MCP completion suggestions from typed published schemas and the
resources/list admission fix for bound template publications.
Accepted evidence being reused (unchanged code paths)
- 3.16 candidate: core 7, admin-api 22, registry 4, mcp-server 4, UI 6; one final
`just verify` run 1651 passed / 0 failed / 2 ignored.
- 3.17 candidate: full run 1672 passed / 0 failed / 2 ignored, QA targeted reruns and
a real MCP Inspector 2.12.0 client smoke.
Delivery engineering in this commit
- CI: one event per change (feature branches are gated by their pull request, push
runs only on main), story events run the changed packages, the full workspace suite
stays the feature/release gate; no cache/sharding without a measured runner check.
- Release: the packaged archives, checksums and SBOM are now uploaded to the Gitea
release entry of the tag instead of dying with the runner workspace.
Not included on purpose: Story 3.18 work, build caches, runtime databases, local
credentials and scratch evidence.
Refs: crank kanban t_e39d7263; baseline 1b6db09bd1.
This commit is contained in:
1 parent
1b6db09bd1
commit
54ce770682
357 files changed
+117394
-5115
No files matched your search
@@ -2,269 +2,10 @@ use sqlx::{PgConnection, Row, query};
|
||||
|
||||
use super::authority::MigrationError;
|
||||
|
||||
pub(super) const OWNED_RELATIONS: &[&str] = &[
|
||||
"__crank_core_migrations",
|
||||
"__crank_migrations",
|
||||
"__crank_migration_legacy_audit",
|
||||
"__crank_mcp_migrations",
|
||||
"__crank_ext_migrations",
|
||||
"mcp_transport_sessions",
|
||||
"workspaces",
|
||||
"users",
|
||||
"memberships",
|
||||
"user_sessions",
|
||||
"invitation_tokens",
|
||||
"platform_api_keys",
|
||||
"operations",
|
||||
"operation_versions",
|
||||
"published_operations",
|
||||
"operation_samples",
|
||||
"descriptors",
|
||||
"agents",
|
||||
"agent_versions",
|
||||
"published_agents",
|
||||
"agent_operation_bindings",
|
||||
"secrets",
|
||||
"secret_versions",
|
||||
"master_key_identities",
|
||||
"master_key_rotations",
|
||||
"auth_profiles",
|
||||
"workspace_upstreams",
|
||||
"yaml_import_jobs",
|
||||
"import_jobs",
|
||||
"approval_requests",
|
||||
"invocation_logs",
|
||||
"usage_rollups",
|
||||
"artifact_blobs",
|
||||
"artifact_sources",
|
||||
"import_plans",
|
||||
"import_plan_applications",
|
||||
"onboarding_import_selections",
|
||||
];
|
||||
mod required_tables;
|
||||
|
||||
const REQUIRED_COLUMNS: &[(&str, &[&str])] = &[
|
||||
(
|
||||
"__crank_core_migrations",
|
||||
&["version", "description", "checksum", "applied_at"],
|
||||
),
|
||||
(
|
||||
"__crank_migrations",
|
||||
&[
|
||||
"version",
|
||||
"name",
|
||||
"checksum",
|
||||
"phase",
|
||||
"compatibility",
|
||||
"applied_at",
|
||||
],
|
||||
),
|
||||
(
|
||||
"__crank_migration_legacy_audit",
|
||||
&["source", "source_version", "source_checksum", "imported_at"],
|
||||
),
|
||||
(
|
||||
"__crank_mcp_migrations",
|
||||
&["version", "checksum", "applied_at"],
|
||||
),
|
||||
(
|
||||
"__crank_ext_migrations",
|
||||
&["extension_name", "version", "checksum", "applied_at"],
|
||||
),
|
||||
(
|
||||
"mcp_transport_sessions",
|
||||
&[
|
||||
"id",
|
||||
"protocol_version",
|
||||
"initialized",
|
||||
"supports_elicitation",
|
||||
"workspace_slug",
|
||||
"agent_slug",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
"expires_at",
|
||||
],
|
||||
),
|
||||
(
|
||||
"master_key_identities",
|
||||
&[
|
||||
"epoch",
|
||||
"fingerprint",
|
||||
"cipher_contract",
|
||||
"status",
|
||||
"backup_ref",
|
||||
"created_at",
|
||||
"activated_at",
|
||||
"retired_at",
|
||||
],
|
||||
),
|
||||
(
|
||||
"master_key_rotations",
|
||||
&[
|
||||
"id",
|
||||
"source_epoch",
|
||||
"target_epoch",
|
||||
"target_fingerprint",
|
||||
"state",
|
||||
"backup_ref",
|
||||
"checkpoint_secret_id",
|
||||
"total_secret_versions",
|
||||
"processed_secret_versions",
|
||||
"verified_secret_versions",
|
||||
"failure_code",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
],
|
||||
),
|
||||
];
|
||||
|
||||
const REQUIRED_COLUMN_TYPES: &[(&str, &str, &str, bool)] = &[
|
||||
("__crank_core_migrations", "version", "integer", false),
|
||||
("__crank_core_migrations", "description", "text", false),
|
||||
("__crank_core_migrations", "checksum", "text", false),
|
||||
(
|
||||
"__crank_core_migrations",
|
||||
"applied_at",
|
||||
"timestamp with time zone",
|
||||
false,
|
||||
),
|
||||
("__crank_migrations", "version", "bigint", false),
|
||||
("__crank_migrations", "name", "text", false),
|
||||
("__crank_migrations", "checksum", "text", false),
|
||||
("__crank_migrations", "phase", "text", false),
|
||||
("__crank_migrations", "compatibility", "text", false),
|
||||
(
|
||||
"__crank_migrations",
|
||||
"applied_at",
|
||||
"timestamp with time zone",
|
||||
false,
|
||||
),
|
||||
("__crank_migration_legacy_audit", "source", "text", false),
|
||||
(
|
||||
"__crank_migration_legacy_audit",
|
||||
"source_version",
|
||||
"bigint",
|
||||
false,
|
||||
),
|
||||
(
|
||||
"__crank_migration_legacy_audit",
|
||||
"source_checksum",
|
||||
"text",
|
||||
false,
|
||||
),
|
||||
(
|
||||
"__crank_migration_legacy_audit",
|
||||
"imported_at",
|
||||
"timestamp with time zone",
|
||||
false,
|
||||
),
|
||||
("__crank_mcp_migrations", "version", "integer", false),
|
||||
("__crank_mcp_migrations", "checksum", "text", false),
|
||||
(
|
||||
"__crank_mcp_migrations",
|
||||
"applied_at",
|
||||
"timestamp with time zone",
|
||||
false,
|
||||
),
|
||||
("__crank_ext_migrations", "extension_name", "text", false),
|
||||
("__crank_ext_migrations", "version", "integer", false),
|
||||
("__crank_ext_migrations", "checksum", "text", true),
|
||||
(
|
||||
"__crank_ext_migrations",
|
||||
"applied_at",
|
||||
"timestamp with time zone",
|
||||
false,
|
||||
),
|
||||
("mcp_transport_sessions", "id", "text", false),
|
||||
("mcp_transport_sessions", "protocol_version", "text", false),
|
||||
("mcp_transport_sessions", "initialized", "boolean", false),
|
||||
(
|
||||
"mcp_transport_sessions",
|
||||
"supports_elicitation",
|
||||
"boolean",
|
||||
false,
|
||||
),
|
||||
("mcp_transport_sessions", "workspace_slug", "text", false),
|
||||
("mcp_transport_sessions", "agent_slug", "text", false),
|
||||
(
|
||||
"mcp_transport_sessions",
|
||||
"created_at",
|
||||
"timestamp with time zone",
|
||||
false,
|
||||
),
|
||||
(
|
||||
"mcp_transport_sessions",
|
||||
"updated_at",
|
||||
"timestamp with time zone",
|
||||
false,
|
||||
),
|
||||
(
|
||||
"mcp_transport_sessions",
|
||||
"expires_at",
|
||||
"timestamp with time zone",
|
||||
true,
|
||||
),
|
||||
("master_key_identities", "epoch", "bigint", false),
|
||||
("master_key_identities", "fingerprint", "text", false),
|
||||
("master_key_identities", "cipher_contract", "text", false),
|
||||
("master_key_identities", "status", "text", false),
|
||||
("master_key_identities", "backup_ref", "text", true),
|
||||
(
|
||||
"master_key_identities",
|
||||
"created_at",
|
||||
"timestamp with time zone",
|
||||
false,
|
||||
),
|
||||
(
|
||||
"master_key_identities",
|
||||
"activated_at",
|
||||
"timestamp with time zone",
|
||||
true,
|
||||
),
|
||||
(
|
||||
"master_key_identities",
|
||||
"retired_at",
|
||||
"timestamp with time zone",
|
||||
true,
|
||||
),
|
||||
("master_key_rotations", "id", "text", false),
|
||||
("master_key_rotations", "source_epoch", "bigint", false),
|
||||
("master_key_rotations", "target_epoch", "bigint", false),
|
||||
("master_key_rotations", "target_fingerprint", "text", false),
|
||||
("master_key_rotations", "state", "text", false),
|
||||
("master_key_rotations", "backup_ref", "text", true),
|
||||
("master_key_rotations", "checkpoint_secret_id", "text", true),
|
||||
(
|
||||
"master_key_rotations",
|
||||
"total_secret_versions",
|
||||
"bigint",
|
||||
false,
|
||||
),
|
||||
(
|
||||
"master_key_rotations",
|
||||
"processed_secret_versions",
|
||||
"bigint",
|
||||
false,
|
||||
),
|
||||
(
|
||||
"master_key_rotations",
|
||||
"verified_secret_versions",
|
||||
"bigint",
|
||||
false,
|
||||
),
|
||||
("master_key_rotations", "failure_code", "text", true),
|
||||
(
|
||||
"master_key_rotations",
|
||||
"created_at",
|
||||
"timestamp with time zone",
|
||||
false,
|
||||
),
|
||||
(
|
||||
"master_key_rotations",
|
||||
"updated_at",
|
||||
"timestamp with time zone",
|
||||
false,
|
||||
),
|
||||
];
|
||||
pub(super) use required_tables::OWNED_RELATIONS;
|
||||
use required_tables::{REQUIRED_COLUMN_TYPES, REQUIRED_COLUMNS};
|
||||
|
||||
pub(super) async fn relation_exists(
|
||||
connection: &mut PgConnection,
|
||||
@@ -662,6 +403,71 @@ pub(super) async fn validate_schema_fingerprint(
|
||||
} else {
|
||||
super::schema_guard_v15::validate_v15_onboarding_import_selection(connection).await?;
|
||||
}
|
||||
if current_version < 16 {
|
||||
if !super::schema_guard_v16::validate_v16_absent(connection).await? {
|
||||
return Err(schema_error(current_version));
|
||||
}
|
||||
} else {
|
||||
super::schema_guard_v16::validate_v16_resource_drafts(connection, current_version).await?;
|
||||
}
|
||||
if current_version < 17 {
|
||||
if !super::schema_guard_v17::validate_v17_absent(connection).await? {
|
||||
return Err(schema_error(current_version));
|
||||
}
|
||||
} else {
|
||||
super::schema_guard_v17::validate_v17_resource_publications(connection, current_version)
|
||||
.await?;
|
||||
}
|
||||
if current_version < 18 {
|
||||
if !super::schema_guard_v18::validate_v18_absent(connection).await? {
|
||||
return Err(schema_error(current_version));
|
||||
}
|
||||
} else {
|
||||
super::schema_guard_v18::validate_v18_agent_resource_bindings(connection).await?;
|
||||
}
|
||||
if current_version < 19 {
|
||||
if !super::schema_guard_v19::validate_v19_absent(connection).await? {
|
||||
return Err(schema_error(current_version));
|
||||
}
|
||||
} else {
|
||||
super::schema_guard_v19::validate_v19_resource_security_revocations(connection).await?;
|
||||
}
|
||||
if current_version < 20 {
|
||||
if !super::schema_guard_v20::validate_v20_absent(connection).await? {
|
||||
return Err(schema_error(current_version));
|
||||
}
|
||||
} else {
|
||||
super::schema_guard_v20::validate_v20_resource_template_sources(connection).await?;
|
||||
}
|
||||
if current_version < 21 {
|
||||
for relation in [
|
||||
"prompts",
|
||||
"prompt_versions",
|
||||
"prompt_arguments",
|
||||
"prompt_messages",
|
||||
] {
|
||||
if relation_exists(connection, relation).await? {
|
||||
return Err(schema_error(current_version));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
validate_required_relations(connection, super::owned_relations::PROMPTS, current_version)
|
||||
.await?;
|
||||
}
|
||||
if current_version < 22 {
|
||||
if !super::schema_guard_v22::validate_v22_absent(connection).await? {
|
||||
return Err(schema_error(current_version));
|
||||
}
|
||||
} else {
|
||||
super::schema_guard_v22::validate_v22_prompt_publications(connection).await?;
|
||||
}
|
||||
if current_version < 23 {
|
||||
if !super::schema_guard_v23::validate_v23_absent(connection).await? {
|
||||
return Err(schema_error(current_version));
|
||||
}
|
||||
} else {
|
||||
super::schema_guard_v23::validate_v23_prompt_dependencies(connection).await?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user