pomaster 0.3.0 → 0.5.0
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.
- package/README.md +57 -22
- package/catalog/archetypes/archetype.frontend.error_taxonomy.json +13 -5
- package/catalog/archetypes/archetype.frontend.feature_oriented.json +1 -1
- package/catalog/archetypes/archetype.state.async_command.json +4 -4
- package/catalog/catalog-lock.draft.json +1120 -104
- package/catalog/gates/gate.be.api.contract_checks.json +2 -1
- package/catalog/gates/gate.be.chg.contract_change_checks.json +2 -1
- package/catalog/gates/gate.chg.prechange_checks.json +2 -1
- package/catalog/gates/gate.web.api.request_checks.json +2 -1
- package/catalog/gates/gate.web.grid.checks.json +2 -1
- package/catalog/knowledge/knowledge.api.example_stable_error_code.json +2 -1
- package/catalog/knowledge/knowledge.chg.example_compat_window.json +2 -1
- package/catalog/knowledge/knowledge.chg.example_prop_migration.json +2 -1
- package/catalog/knowledge/knowledge.fp.api.field_drift_no_contract.json +2 -1
- package/catalog/knowledge/knowledge.fp.api.per_page_http_client.json +2 -1
- package/catalog/knowledge/knowledge.fp.be.contract_drift.json +2 -1
- package/catalog/knowledge/knowledge.fp.chg.page_local_padding.json +2 -1
- package/catalog/knowledge/knowledge.fp.grid.global_td_width.json +2 -1
- package/catalog/knowledge/knowledge.web.api.example_get_entity_list.json +2 -1
- package/catalog/knowledge/knowledge.web.grid.example_column_preset.json +2 -1
- package/catalog/policies/authority.be.api_contract_ownership.json +2 -1
- package/catalog/policies/authority.be.contract_ownership.json +2 -1
- package/catalog/policies/authority.chg.change_owners.json +2 -1
- package/catalog/policies/authority.web.api.request_owners.json +2 -1
- package/catalog/policies/authority.web.grid.ownership.json +2 -1
- package/catalog/policies/policy.ai.change_plan_first.json +91 -0
- package/catalog/policies/policy.ai.fact_inference_separation.json +91 -0
- package/catalog/policies/policy.ai.read_search_verify_before_write.json +92 -0
- package/catalog/policies/policy.ai.rule_relaxation_approval.json +91 -0
- package/catalog/policies/policy.api.backward_compat_defaults.json +2 -1
- package/catalog/policies/policy.api.contract_impl_consistency.json +2 -1
- package/catalog/policies/policy.api.no_informal_contract.json +2 -1
- package/catalog/policies/policy.arch.adr_immutable_history.json +91 -0
- package/catalog/policies/policy.arch.decision_tradeoff_record.json +2 -1
- package/catalog/policies/policy.arch.no_convenience_over_boundary.json +93 -0
- package/catalog/policies/policy.arch.prefer_verifiable_option.json +92 -0
- package/catalog/policies/policy.authz.no_gating_proxy_trust.json +99 -0
- package/catalog/policies/policy.authz.permission_scope_expansion_gate.json +99 -0
- package/catalog/policies/policy.authz.server_five_factor_verification.json +101 -0
- package/catalog/policies/policy.be.conc.prefer_db_constraints.json +97 -0
- package/catalog/policies/policy.be.db.expand_migrate_contract.json +97 -0
- package/catalog/policies/policy.be.idem.key_payload_conflict.json +97 -0
- package/catalog/policies/policy.be.model.single_boundary_conversion.json +97 -0
- package/catalog/policies/policy.be.sql.index_for_known_queries.json +97 -0
- package/catalog/policies/policy.be.state.single_rule_source.json +97 -0
- package/catalog/policies/policy.be.txn.short_locks_compensation.json +96 -0
- package/catalog/policies/policy.bound.search_first_entry_only.json +91 -0
- package/catalog/policies/policy.boundary.validate_in_encode_out.json +92 -0
- package/catalog/policies/policy.cache.failure_mode_guards.json +93 -0
- package/catalog/policies/policy.cache.lifecycle_definition.json +2 -1
- package/catalog/policies/policy.cache.schema_versioning.json +91 -0
- package/catalog/policies/policy.cfg.config_attribute_completeness.json +95 -0
- package/catalog/policies/policy.cfg.key_rename_dual_read.json +92 -0
- package/catalog/policies/policy.cfg.no_secret_dispersal.json +90 -0
- package/catalog/policies/policy.cfg.production_safe_defaults.json +92 -0
- package/catalog/policies/policy.cfg.schema_backed_config.json +92 -0
- package/catalog/policies/policy.chg.affect_templates.json +2 -1
- package/catalog/policies/policy.chg.breaking_versioning.json +2 -1
- package/catalog/policies/policy.chg.compat_migration_rollback.json +2 -1
- package/catalog/policies/policy.chg.deprecate_before_delete.json +2 -1
- package/catalog/policies/policy.chg.fix_at_root_cause_level.json +2 -1
- package/catalog/policies/policy.chg.no_unrelated_changes.json +91 -0
- package/catalog/policies/policy.chg.observable_evolution.json +2 -1
- package/catalog/policies/policy.chg.prechange_consumer_scan.json +2 -1
- package/catalog/policies/policy.chg.staged_rollout.json +2 -1
- package/catalog/policies/policy.chg.sync_contract_docs_tests.json +2 -1
- package/catalog/policies/policy.conflict.priority_ladder.json +2 -1
- package/catalog/policies/policy.contract.no_invented_facts.json +93 -0
- package/catalog/policies/policy.dep.admission_six_dimension_check.json +2 -1
- package/catalog/policies/policy.dep.build_path_supply_chain.json +93 -0
- package/catalog/policies/policy.dep.change_surface_review.json +2 -1
- package/catalog/policies/policy.dep.introduction_review.json +2 -1
- package/catalog/policies/policy.dep.no_untrusted_source_no_lock_bypass.json +92 -0
- package/catalog/policies/policy.dep.time_boxed_urgent_exception.json +91 -0
- package/catalog/policies/policy.deploy.no_dev_env_as_production_fact.json +91 -0
- package/catalog/policies/policy.deploy.operational_capabilities.json +93 -0
- package/catalog/policies/policy.deploy.runtime_fact_record.json +97 -0
- package/catalog/policies/policy.derived.single_implementation.json +2 -1
- package/catalog/policies/policy.err.failure_five_part_mapping.json +101 -0
- package/catalog/policies/policy.err.no_internal_detail_exposure.json +97 -0
- package/catalog/policies/policy.err.published_code_immutable.json +98 -0
- package/catalog/policies/policy.evid.acceptance_binds_verifiable_evidence.json +92 -0
- package/catalog/policies/policy.evid.no_silent_gate_removal.json +90 -0
- package/catalog/policies/policy.evid.no_unverifiable_pass.json +92 -0
- package/catalog/policies/policy.flag.cleanup_after_full_rollout.json +94 -0
- package/catalog/policies/policy.flag.consistent_off_state.json +92 -0
- package/catalog/policies/policy.flag.kill_switch.json +91 -0
- package/catalog/policies/policy.flag.lifecycle_metadata.json +93 -0
- package/catalog/policies/policy.flag.not_a_permission.json +92 -0
- package/catalog/policies/policy.gate.p0_non_bypassable.json +92 -0
- package/catalog/policies/policy.gate.risk_factors_confirmed.json +93 -0
- package/catalog/policies/policy.guard.no_check_weakening.json +92 -0
- package/catalog/policies/policy.integration.call_definition_minimum.json +95 -0
- package/catalog/policies/policy.integration.fault_containment.json +94 -0
- package/catalog/policies/policy.job.lifecycle_definition.json +96 -0
- package/catalog/policies/policy.job.no_unmanaged_execution.json +92 -0
- package/catalog/policies/policy.job.operational_features.json +93 -0
- package/catalog/policies/policy.obs.actionable_signals.json +93 -0
- package/catalog/policies/policy.obs.alert_with_owner.json +91 -0
- package/catalog/policies/policy.obs.context_field_baseline.json +91 -0
- package/catalog/policies/policy.obs.correlation_context_minimum.json +2 -1
- package/catalog/policies/policy.obs.no_sensitive_or_unbounded_logging.json +92 -0
- package/catalog/policies/policy.obs.no_sensitive_raw_values.json +93 -0
- package/catalog/policies/policy.obs.rum_dimension_whitelist.json +2 -1
- package/catalog/policies/policy.obs.signal_change_impact.json +91 -0
- package/catalog/policies/policy.obs.source_map_access_control.json +92 -0
- package/catalog/policies/policy.obs.telemetry_lifecycle_declared.json +93 -0
- package/catalog/policies/policy.obs.trace_correlation.json +91 -0
- package/catalog/policies/policy.perf.budget_change_retest.json +91 -0
- package/catalog/policies/policy.perf.evidence_binding.json +95 -0
- package/catalog/policies/policy.perf.observation_dimensions.json +94 -0
- package/catalog/policies/policy.proc.checklist_change_policy.json +91 -0
- package/catalog/policies/policy.proc.pre_code_declaration.json +2 -1
- package/catalog/policies/policy.proc.scope_drift_reclassify.json +91 -0
- package/catalog/policies/policy.prv.processing_scope_re_review.json +97 -0
- package/catalog/policies/policy.prv.sensitive_data_six_facts.json +102 -0
- package/catalog/policies/policy.registry.human_fields_validated_decorrelated.json +93 -0
- package/catalog/policies/policy.rel.no_irreversible_unmonitored_full_release.json +91 -0
- package/catalog/policies/policy.rel.observability_before_ship.json +91 -0
- package/catalog/policies/policy.rel.pre_release_confirmation.json +2 -1
- package/catalog/policies/policy.rel.process_change_needs_drill_audit.json +91 -0
- package/catalog/policies/policy.rel.traceable_build.json +93 -0
- package/catalog/policies/policy.role.domain_decision_authority.json +2 -1
- package/catalog/policies/policy.role.human_signs_for_ai.json +93 -0
- package/catalog/policies/policy.sec.authn_policy_unified.json +91 -0
- package/catalog/policies/policy.sec.no_client_side_trust.json +95 -0
- package/catalog/policies/policy.sec.no_longterm_security_disable.json +91 -0
- package/catalog/policies/policy.sec.no_script_readable_credentials.json +91 -0
- package/catalog/policies/policy.sec.no_secrets_in_client_surface.json +91 -0
- package/catalog/policies/policy.sec.relaxation_approval.json +92 -0
- package/catalog/policies/policy.sec.security_relaxation_gate.json +95 -0
- package/catalog/policies/policy.sec.third_party_execution_register.json +2 -1
- package/catalog/policies/policy.sec.trust_boundary_enforcement.json +96 -0
- package/catalog/policies/policy.sec.upload_download_server_recheck.json +91 -0
- package/catalog/policies/policy.sec.url_source_allowlist.json +91 -0
- package/catalog/policies/policy.spec.admission_criteria.json +2 -1
- package/catalog/policies/policy.spec.derived_view_regeneration.json +2 -1
- package/catalog/policies/policy.spec.draft_not_baseline.json +2 -1
- package/catalog/policies/policy.spec.family_conflict_precedence.json +93 -0
- package/catalog/policies/policy.spec.file_structure_contract.json +2 -1
- package/catalog/policies/policy.spec.freeze_before_use.json +93 -0
- package/catalog/policies/policy.spec.metadata_required.json +2 -1
- package/catalog/policies/policy.spec.post_dev_backfill_classify.json +2 -1
- package/catalog/policies/policy.spec.primary_source_basis.json +93 -0
- package/catalog/policies/policy.spec.procedural_record_not_surrogate.json +2 -1
- package/catalog/policies/policy.spec.semantic_identity.json +2 -1
- package/catalog/policies/policy.spec.unresolved_ledger_gate.json +2 -1
- package/catalog/policies/policy.stack.derived_store_not_authority.json +93 -0
- package/catalog/policies/policy.stack.dual_web_stack_boundary.json +93 -0
- package/catalog/policies/policy.stack.entry_chain_recorded.json +93 -0
- package/catalog/policies/policy.stack.entry_limits_aligned.json +94 -0
- package/catalog/policies/policy.stack.local_form_not_prod_fact.json +93 -0
- package/catalog/policies/policy.stack.multi_datastore_ownership.json +93 -0
- package/catalog/policies/policy.stack.no_implicit_selection.json +2 -1
- package/catalog/policies/policy.stack.persistence_coexistence_scope.json +93 -0
- package/catalog/policies/policy.stack.toolchain_versions_pinned.json +95 -0
- package/catalog/policies/policy.stack.upgrade_compat_verified.json +93 -0
- package/catalog/policies/policy.struct.module_entry_dependency_declared.json +92 -0
- package/catalog/policies/policy.struct.no_unexplained_top_level_dir.json +91 -0
- package/catalog/policies/policy.struct.reuse_proven_structure.json +91 -0
- package/catalog/policies/policy.test.control_nondeterminism_keep_diagnosis.json +91 -0
- package/catalog/policies/policy.test.isolation_and_cleanup.json +93 -0
- package/catalog/policies/policy.test.no_synthetic_stability.json +92 -0
- package/catalog/policies/policy.test.pyramid_and_ci_matrix.json +92 -0
- package/catalog/policies/policy.test.removal_justification.json +91 -0
- package/catalog/policies/policy.test.removal_needs_substitute_evidence.json +91 -0
- package/catalog/policies/policy.test.risk_driven_plan.json +92 -0
- package/catalog/policies/policy.test.stable_observable_assertions.json +92 -0
- package/catalog/policies/policy.tool.discoverable_toolchain.json +92 -0
- package/catalog/policies/policy.tool.no_hand_edit_generated_no_ci_drift.json +91 -0
- package/catalog/policies/policy.tool.no_vendored_body_edits.json +94 -0
- package/catalog/policies/policy.tool.scoped_scan_boundary.json +2 -1
- package/catalog/policies/policy.tool.upgrade_verify_lock_rollback.json +92 -0
- package/catalog/policies/policy.web.api.auth_app_client_split.json +2 -1
- package/catalog/policies/policy.web.api.client_change_impact.json +2 -1
- package/catalog/policies/policy.web.api.domain_api_only.json +2 -1
- package/catalog/policies/policy.web.api.error_normalization.json +2 -1
- package/catalog/policies/policy.web.api.generated_client.json +2 -1
- package/catalog/policies/policy.web.api.late_result_guard.json +2 -1
- package/catalog/policies/policy.web.api.mutation_idempotency.json +2 -1
- package/catalog/policies/policy.web.api.no_network_optimism.json +2 -1
- package/catalog/policies/policy.web.api.query_cancel_stale_drop.json +2 -1
- package/catalog/policies/policy.web.api.request_infrastructure.json +2 -1
- package/catalog/policies/policy.web.api.retry_discipline.json +2 -1
- package/catalog/policies/policy.web.api.session_recovery_split.json +2 -1
- package/catalog/policies/policy.web.api.single_http_client.json +2 -1
- package/catalog/policies/policy.web.api.single_loading_source.json +2 -1
- package/catalog/policies/policy.web.api.transport_vs_business.json +2 -1
- package/catalog/policies/policy.web.api.trusted_endpoint_source.json +2 -1
- package/catalog/policies/policy.web.api.typed_domain_naming.json +2 -1
- package/catalog/policies/policy.web.arch.layer_isolation.json +2 -1
- package/catalog/policies/policy.web.arch.naming_conventions.json +2 -1
- package/catalog/policies/policy.web.arch.public_api_barrel.json +2 -1
- package/catalog/policies/policy.web.chg.controlled_change_triggers.json +2 -1
- package/catalog/policies/policy.web.comp.no_trivial_or_god_component.json +91 -0
- package/catalog/policies/policy.web.comp.public_contract_completeness.json +93 -0
- package/catalog/policies/policy.web.copy.action_object_clarity.json +92 -0
- package/catalog/policies/policy.web.copy.enumerable_placement.json +91 -0
- package/catalog/policies/policy.web.copy.error_next_step.json +92 -0
- package/catalog/policies/policy.web.copy.suppression_ledger_discipline.json +2 -1
- package/catalog/policies/policy.web.grid.column_schema_fields.json +2 -1
- package/catalog/policies/policy.web.grid.config_isolation.json +2 -1
- package/catalog/policies/policy.web.grid.freeze_key_columns.json +2 -1
- package/catalog/policies/policy.web.grid.interaction_registry.json +2 -1
- package/catalog/policies/policy.web.grid.keyboard_clipboard.json +2 -1
- package/catalog/policies/policy.web.grid.schema_driven_shell.json +2 -1
- package/catalog/policies/policy.web.grid.schema_versioning.json +2 -1
- package/catalog/policies/policy.web.grid.server_ops_virtualization.json +2 -1
- package/catalog/policies/policy.web.grid.shell_change_matrix.json +2 -1
- package/catalog/policies/policy.web.grid.width_fix_ladder.json +2 -1
- package/catalog/policies/policy.web.handoff.state_matrix_full.json +94 -0
- package/catalog/policies/policy.web.i18n.copy_key_discipline.json +92 -0
- package/catalog/policies/policy.web.i18n.raw_value_for_compute.json +91 -0
- package/catalog/policies/policy.web.page.region_consistency.json +93 -0
- package/catalog/policies/policy.web.perf.budget_skeleton.json +2 -1
- package/catalog/policies/policy.web.style.ownership_matrix.json +2 -1
- package/catalog/policies/policy.web.track.attempt_result_correlation.json +91 -0
- package/catalog/policies/policy.web.track.consent_lifecycle.json +2 -1
- package/catalog/policies/policy.web.track.no_synthetic_actions.json +92 -0
- package/catalog/policies/policy.web.track.privacy_default_deny.json +2 -1
- package/catalog/policies/policy.web.track.stable_event_keys.json +2 -1
- package/catalog/policies/policy.web.track.typed_client_validation.json +91 -0
- package/catalog/policies/policy.web.uiux.provider_evidence_not_business_truth.json +2 -1
- package/catalog/policies/policy.wf.no_planned_as_verified.json +91 -0
- package/catalog/policies/policy.wf.task_facts_preconfirm.json +94 -0
- package/catalog/policies/profile.baseline.java_enterprise_default.json +96 -0
- package/catalog/sensors/sensor.browser.deterministic.json +2 -1
- package/catalog/sensors/sensor.browser.interactive.json +2 -1
- package/catalog/sensors/sensor.build.static.json +2 -1
- package/catalog/sensors/sensor.contract.conformance.json +2 -1
- package/catalog/sensors/sensor.performance.budget.json +2 -1
- package/catalog/sensors/sensor.production.metric.json +2 -1
- package/catalog/tools/seed_b6b_frontend.py +1424 -0
- package/catalog/tools/seed_b6c_backend.py +1495 -0
- package/catalog/tools/seed_b6d_baseline.py +620 -0
- package/catalog/tools/seed_b6e_evidence.py +1305 -0
- package/catalog/tools/seed_d3_review.py +1105 -0
- package/catalog/tools/seed_v06_batch2_materials.py +27 -18
- package/dist/bin.js +20514 -10735
- package/package.json +2 -1
- package/seeds/aggregation-manifest.json +691 -0
- package/seeds/baseline/backend/api-contract.md +26 -0
- package/seeds/baseline/backend/architecture.md +31 -0
- package/seeds/baseline/backend/data-access.md +31 -0
- package/seeds/baseline/backend/directory-structure.md +11 -0
- package/seeds/baseline/backend/integration-runtime.md +21 -0
- package/seeds/baseline/backend/quality.md +31 -0
- package/seeds/baseline/backend/stack.yaml +13 -0
- package/seeds/baseline/backend/transaction-concurrency.md +26 -0
- package/seeds/baseline/data/lineage.md +11 -0
- package/seeds/baseline/data/migration.md +11 -0
- package/seeds/baseline/data/model.md +31 -0
- package/seeds/baseline/data/precision-units.md +31 -0
- package/seeds/baseline/data/quality.md +31 -0
- package/seeds/baseline/frontend/api-and-error.md +21 -0
- package/seeds/baseline/frontend/architecture.md +26 -0
- package/seeds/baseline/frontend/design-system.md +21 -0
- package/seeds/baseline/frontend/directory-structure.md +16 -0
- package/seeds/baseline/frontend/quality.md +26 -0
- package/seeds/baseline/frontend/stack.yaml +17 -0
- package/seeds/baseline/frontend/state-and-data.md +26 -0
- package/seeds/baseline/manifest.yaml +32 -0
- package/seeds/baseline/platform/delivery.md +36 -0
- package/seeds/baseline/platform/environment.md +11 -0
- package/seeds/baseline/platform/observability.md +31 -0
- package/seeds/baseline/platform/security.md +26 -0
- package/seeds/manifest.json +1429 -0
- package/seeds/specs/evidence/accessibility.md +89 -0
- package/seeds/specs/evidence/architecture.md +89 -0
- package/seeds/specs/evidence/browser-e2e.md +91 -0
- package/seeds/specs/evidence/build.md +91 -0
- package/seeds/specs/evidence/business-acceptance.md +89 -0
- package/seeds/specs/evidence/complexity-crap.md +97 -0
- package/seeds/specs/evidence/contract.md +89 -0
- package/seeds/specs/evidence/coverage.md +91 -0
- package/seeds/specs/evidence/data-migration.md +91 -0
- package/seeds/specs/evidence/dead-code-duplicate.md +89 -0
- package/seeds/specs/evidence/dependency-supply-chain.md +89 -0
- package/seeds/specs/evidence/index.md +55 -0
- package/seeds/specs/evidence/mutation.md +89 -0
- package/seeds/specs/evidence/performance.md +89 -0
- package/seeds/specs/evidence/release.md +91 -0
- package/seeds/specs/evidence/runtime-observability.md +91 -0
- package/seeds/specs/evidence/security.md +89 -0
- package/seeds/specs/evidence/typecheck-lint.md +91 -0
- package/seeds/specs/evidence/unit-component-integration.md +91 -0
- package/seeds/specs/evidence/visual-regression.md +89 -0
- package/seeds/specs/hard/stacks/antdesign/antdesign-ui-overlay.md +48 -0
- package/seeds/specs/hard/stacks/antdesign/index.md +20 -0
- package/seeds/specs/hard/stacks/css/css-system-overlay.md +52 -0
- package/seeds/specs/hard/stacks/css/index.md +20 -0
- package/seeds/specs/hard/stacks/geist/geist-design-system-overlay.md +48 -0
- package/seeds/specs/hard/stacks/geist/index.md +20 -0
- package/seeds/specs/hard/stacks/java/index.md +20 -0
- package/seeds/specs/hard/stacks/java/java-language-overlay.md +35 -0
- package/seeds/specs/hard/stacks/jpa/index.md +20 -0
- package/seeds/specs/hard/stacks/jpa/jpa-persistence-overlay.md +35 -0
- package/seeds/specs/hard/stacks/kubernetes-ingress/index.md +20 -0
- package/seeds/specs/hard/stacks/kubernetes-ingress/kubernetes-ingress-overlay.md +35 -0
- package/seeds/specs/hard/stacks/messaging/index.md +20 -0
- package/seeds/specs/hard/stacks/messaging/messaging-reliability-overlay.md +35 -0
- package/seeds/specs/hard/stacks/mybatis/index.md +20 -0
- package/seeds/specs/hard/stacks/mybatis/mybatis-persistence-overlay.md +35 -0
- package/seeds/specs/hard/stacks/mysql/index.md +20 -0
- package/seeds/specs/hard/stacks/mysql/mysql-database-overlay.md +35 -0
- package/seeds/specs/hard/stacks/nginx/index.md +20 -0
- package/seeds/specs/hard/stacks/nginx/nginx-proxy-overlay.md +35 -0
- package/seeds/specs/hard/stacks/postgresql/index.md +20 -0
- package/seeds/specs/hard/stacks/postgresql/postgresql-database-overlay.md +35 -0
- package/seeds/specs/hard/stacks/redis/index.md +20 -0
- package/seeds/specs/hard/stacks/redis/redis-cache-overlay.md +35 -0
- package/seeds/specs/hard/stacks/spring-batch/index.md +20 -0
- package/seeds/specs/hard/stacks/spring-batch/spring-batch-job-overlay.md +35 -0
- package/seeds/specs/hard/stacks/spring-boot/index.md +20 -0
- package/seeds/specs/hard/stacks/spring-boot/spring-boot-application-overlay.md +35 -0
- package/seeds/specs/hard/stacks/spring-mvc/index.md +20 -0
- package/seeds/specs/hard/stacks/spring-mvc/spring-mvc-web-overlay.md +35 -0
- package/seeds/specs/hard/stacks/spring-webflux/index.md +20 -0
- package/seeds/specs/hard/stacks/spring-webflux/spring-webflux-reactive-overlay.md +35 -0
- package/seeds/specs/hard/stacks/tomcat/index.md +20 -0
- package/seeds/specs/hard/stacks/tomcat/tomcat-runtime-overlay.md +35 -0
- package/seeds/specs/hard/stacks/vue3/index.md +20 -0
- package/seeds/specs/hard/stacks/vue3/vue3-framework-overlay.md +71 -0
- package/seeds/specs/hard/themes/ai-generated-code.md +171 -0
- package/seeds/specs/hard/themes/api-contract-and-error-semantics.md +532 -0
- package/seeds/specs/hard/themes/architecture-and-module-boundaries.md +323 -0
- package/seeds/specs/hard/themes/data-and-transactions.md +582 -0
- package/seeds/specs/hard/themes/engineering-toolchain-and-dependencies.md +333 -0
- package/seeds/specs/hard/themes/environment-and-configuration.md +196 -0
- package/seeds/specs/hard/themes/frontend-state-and-client-data.md +342 -0
- package/seeds/specs/hard/themes/index.md +374 -0
- package/seeds/specs/hard/themes/integration-and-async-runtime.md +331 -0
- package/seeds/specs/hard/themes/internationalization-and-copywriting.md +350 -0
- package/seeds/specs/hard/themes/observability-and-analytics.md +305 -0
- package/seeds/specs/hard/themes/page-composition-and-browser-environment.md +554 -0
- package/seeds/specs/hard/themes/performance-and-capacity.md +226 -0
- package/seeds/specs/hard/themes/permission-and-authorization.md +168 -0
- package/seeds/specs/hard/themes/privacy-and-data-lifecycle.md +176 -0
- package/seeds/specs/hard/themes/release-and-feature-flags.md +237 -0
- package/seeds/specs/hard/themes/security.md +372 -0
- package/seeds/specs/hard/themes/task-governance-and-acceptance.md +554 -0
- package/seeds/specs/hard/themes/testing-and-verification.md +266 -0
- package/seeds/specs/hard/themes/ui-presentation-and-design.md +670 -0
- package/seeds/specs/hard/themes/value-semantics-and-domain-data.md +339 -0
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: packages/cli/seeds/aggregation-manifest.json
|
|
3
|
+
seed_source_sha256: 039b637ccffacdfe3ce30d85e193f4b38928fcdfb16efdc4eb255e35e05af91f
|
|
4
|
+
seed_version: B7-THEME
|
|
5
|
+
lane: [backend]
|
|
6
|
+
status: CURRENT
|
|
7
|
+
authority_scope: mixed_required_and_advisory
|
|
8
|
+
applies_to: [backend]
|
|
9
|
+
related_evidence_specs: []
|
|
10
|
+
related_tools: []
|
|
11
|
+
legacy_id: theme:data-and-transactions
|
|
12
|
+
criticality: critical # 聚合注记:取源最高;info 性注记非执行语义
|
|
13
|
+
injection_mode: triggered # 聚合注记:来源同值;info 性注记非执行语义
|
|
14
|
+
stages: [prepare, implement, check, release] # 聚合注记:来源 stages 并集;info 性注记非执行语义
|
|
15
|
+
triggers: [business-rules, state-transition, data-model, dto, mapping, database-schema, migration, data-repair, sql, query, index, pagination, transaction, concurrency, locking, idempotency, callback, replay, redis, cache] # 聚合注记:来源 triggers 并集;info 性注记非执行语义
|
|
16
|
+
requires: [] # 聚合注记:来源 requires 并集(全空)
|
|
17
|
+
x-aggregation: # 聚合来源(D6):逐源 vendor pin(sha256 与卡 vendor_pin 同值)
|
|
18
|
+
- seed_source: pomaster/components/backend-hard-spec/assets/universal/14-business-rules-state-protocol.md
|
|
19
|
+
sha256: fb255dd2331ac35e73a1ad222e4de4ec2f5fb3a09e675de0e1919d80022ac291
|
|
20
|
+
seed_version: B6C
|
|
21
|
+
- seed_source: pomaster/components/backend-hard-spec/assets/universal/15-data-model-protocol.md
|
|
22
|
+
sha256: 21cdd88fac93c9dc834a51d62978b51453ca02eca68f223859aeca0ada99c3f2
|
|
23
|
+
seed_version: B6C
|
|
24
|
+
- seed_source: pomaster/components/backend-hard-spec/assets/universal/18-database-schema-migration-protocol.md
|
|
25
|
+
sha256: e7d0b660673dc1978653c39c9efcc7ad7d9b2809c4a88040a6fcf74839bc82c0
|
|
26
|
+
seed_version: B6C
|
|
27
|
+
- seed_source: pomaster/components/backend-hard-spec/assets/universal/19-query-index-sql-protocol.md
|
|
28
|
+
sha256: 60a660730a82a4f911bc6c18d5f6808a320f722df27d397a4e4b13835111610d
|
|
29
|
+
seed_version: B6C
|
|
30
|
+
- seed_source: pomaster/components/backend-hard-spec/assets/universal/20-transaction-boundary-protocol.md
|
|
31
|
+
sha256: 4c4634b71f1e07e9cae074f9790fa50b3425f0af71300ab2ac12e644b521eff4
|
|
32
|
+
seed_version: B6C
|
|
33
|
+
- seed_source: pomaster/components/backend-hard-spec/assets/universal/21-concurrency-locking-protocol.md
|
|
34
|
+
sha256: 6141612e1135cc67ccd9d47553ea5fa7b9c00e05b6e50706f8e117c80d3b8d95
|
|
35
|
+
seed_version: B6C
|
|
36
|
+
- seed_source: pomaster/components/backend-hard-spec/assets/universal/22-idempotency-protocol.md
|
|
37
|
+
sha256: c97d003622b9075f0c094ec5c5bfa950a977e18b2f4ce8ffc9bc014858e27670
|
|
38
|
+
seed_version: B6C
|
|
39
|
+
- seed_source: pomaster/components/backend-hard-spec/assets/universal/23-cache-redis-consistency-protocol.md
|
|
40
|
+
sha256: 073da5821658adfc0580798873fde95c49dc9d993a63949b3b1543a9c0e18a11
|
|
41
|
+
seed_version: B6C
|
|
42
|
+
x-language-sections: # 语言节同步源(R-J 资产层唯一权威;注入面为同步副本)
|
|
43
|
+
- overlay: pomaster/components/backend-hard-spec/assets/stacks/java/java-language-overlay.md
|
|
44
|
+
sha256: 38b592a5beaa899abb45e871e5097cafedeea80502baee00bcfbfcfa313dab85
|
|
45
|
+
attach: secondary
|
|
46
|
+
- overlay: pomaster/components/backend-hard-spec/assets/stacks/jpa/jpa-persistence-overlay.md
|
|
47
|
+
sha256: e43479fd8659b89863cf47dee9fee3c52727cc2978ffd1b854ea17c777b1e9e6
|
|
48
|
+
attach: primary
|
|
49
|
+
- overlay: pomaster/components/backend-hard-spec/assets/stacks/mybatis/mybatis-persistence-overlay.md
|
|
50
|
+
sha256: 968bfa7df9b4c675161427809fd3d4e9e5b62b2b53a880420f36af00d2c60e57
|
|
51
|
+
attach: primary
|
|
52
|
+
- overlay: pomaster/components/backend-hard-spec/assets/stacks/mysql/mysql-database-overlay.md
|
|
53
|
+
sha256: a47d8c61959c120707bb907275e74ce13b4b36b03fa493bc09cc7d47fcc949d7
|
|
54
|
+
attach: primary
|
|
55
|
+
- overlay: pomaster/components/backend-hard-spec/assets/stacks/postgresql/postgresql-database-overlay.md
|
|
56
|
+
sha256: dbe9f21a72c1124519375176efb2b2b4138b21c45becebfc66eaa2ab41def16e
|
|
57
|
+
attach: primary
|
|
58
|
+
- overlay: pomaster/components/backend-hard-spec/assets/stacks/redis/redis-cache-overlay.md
|
|
59
|
+
sha256: 6ae4d18ce2658a77d34bb3cf2a2c38745b646a730eb3c270c2a4c2a0a24497c7
|
|
60
|
+
attach: primary
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
# 数据与事务
|
|
64
|
+
|
|
65
|
+
> **聚合纪律**:本文档 12 节正文规则行逐字取自 frontmatter x-aggregation 所列来源协议(节内按「端 → 源编号升序」以加粗来源行分块,源内标题与层级原样保留),零新增、零改写、零删除;新增文本仅限文档标题、本注记与逐节来源行。
|
|
66
|
+
文末「语言与栈节」为 stacks overlay 资产 Scope/Rules/Checklist 的逐字节同步副本(标题降 2 级,正文零改动)——资产层为唯一权威,改规则只改 overlay、本区随同步。
|
|
67
|
+
|
|
68
|
+
## Scope
|
|
69
|
+
|
|
70
|
+
**源:BE 14 业务规则与状态协议(pomaster/components/backend-hard-spec/assets/universal/14-business-rules-state-protocol.md)**
|
|
71
|
+
|
|
72
|
+
规范服务端权威不变量、状态机、计算、校验和失败语义。
|
|
73
|
+
|
|
74
|
+
**源:BE 15 数据模型协议(pomaster/components/backend-hard-spec/assets/universal/15-data-model-protocol.md)**
|
|
75
|
+
|
|
76
|
+
规范 Command、DTO、Domain Model、Entity 与持久化模型的边界和映射。
|
|
77
|
+
|
|
78
|
+
**源:BE 18 数据库 Schema 与迁移协议(pomaster/components/backend-hard-spec/assets/universal/18-database-schema-migration-protocol.md)**
|
|
79
|
+
|
|
80
|
+
规范 table、column、type、约束、索引、migration、回滚和数据修复。
|
|
81
|
+
|
|
82
|
+
**源:BE 19 查询、索引与 SQL 协议(pomaster/components/backend-hard-spec/assets/universal/19-query-index-sql-protocol.md)**
|
|
83
|
+
|
|
84
|
+
规范参数化 SQL、查询形态、分页、N+1、索引和执行计划证据。
|
|
85
|
+
|
|
86
|
+
**源:BE 20 事务边界协议(pomaster/components/backend-hard-spec/assets/universal/20-transaction-boundary-protocol.md)**
|
|
87
|
+
|
|
88
|
+
规范事务所有者、边界、隔离、传播、重试、补偿与外部调用。
|
|
89
|
+
|
|
90
|
+
**源:BE 21 并发与锁协议(pomaster/components/backend-hard-spec/assets/universal/21-concurrency-locking-protocol.md)**
|
|
91
|
+
|
|
92
|
+
规范乐观锁、悲观锁、唯一约束、分布式锁和冲突响应。
|
|
93
|
+
|
|
94
|
+
**源:BE 22 幂等协议(pomaster/components/backend-hard-spec/assets/universal/22-idempotency-protocol.md)**
|
|
95
|
+
|
|
96
|
+
规范创建、提交、审批、导入、回调和任务重放语义。
|
|
97
|
+
|
|
98
|
+
**源:BE 23 缓存与 Redis 一致性协议(pomaster/components/backend-hard-spec/assets/universal/23-cache-redis-consistency-protocol.md)**
|
|
99
|
+
|
|
100
|
+
规范 key、value schema、TTL、序列化、失效、一致性、防击穿与降级。
|
|
101
|
+
|
|
102
|
+
## Non-Scope
|
|
103
|
+
|
|
104
|
+
**源:BE 14 业务规则与状态协议**
|
|
105
|
+
|
|
106
|
+
不发明 BP 未确认的业务规则、阈值或状态。
|
|
107
|
+
|
|
108
|
+
**源:BE 15 数据模型协议**
|
|
109
|
+
|
|
110
|
+
不定义具体项目字段、表或业务枚举。
|
|
111
|
+
|
|
112
|
+
**源:BE 18 数据库 Schema 与迁移协议**
|
|
113
|
+
|
|
114
|
+
不规定具体数据库产品的语法或项目表名。
|
|
115
|
+
|
|
116
|
+
**源:BE 19 查询、索引与 SQL 协议**
|
|
117
|
+
|
|
118
|
+
不规定具体数据库的固定索引或性能阈值。
|
|
119
|
+
|
|
120
|
+
**源:BE 20 事务边界协议**
|
|
121
|
+
|
|
122
|
+
不替代业务不变量、锁选择或数据库产品细节。
|
|
123
|
+
|
|
124
|
+
**源:BE 21 并发与锁协议**
|
|
125
|
+
|
|
126
|
+
不替代事务边界或业务状态规则。
|
|
127
|
+
|
|
128
|
+
**源:BE 22 幂等协议**
|
|
129
|
+
|
|
130
|
+
不把所有读取或天然无副作用操作强制包装为幂等流程。
|
|
131
|
+
|
|
132
|
+
**源:BE 23 缓存与 Redis 一致性协议**
|
|
133
|
+
|
|
134
|
+
不默认指定 Redis,也不规定项目 key 与 TTL 数值。
|
|
135
|
+
|
|
136
|
+
## Terms
|
|
137
|
+
|
|
138
|
+
**源:BE 14 业务规则与状态协议**
|
|
139
|
+
|
|
140
|
+
不变量是在任何成功事务后都必须成立的业务条件。
|
|
141
|
+
|
|
142
|
+
**源:BE 15 数据模型协议**
|
|
143
|
+
|
|
144
|
+
边界模型是在特定层或契约中表达数据的稳定结构。
|
|
145
|
+
|
|
146
|
+
**源:BE 18 数据库 Schema 与迁移协议**
|
|
147
|
+
|
|
148
|
+
迁移是受版本控制、顺序稳定且可验证的数据结构或数据变更。
|
|
149
|
+
|
|
150
|
+
**源:BE 19 查询、索引与 SQL 协议**
|
|
151
|
+
|
|
152
|
+
查询形态包括过滤、连接、排序、分页、聚合与预期数据规模。
|
|
153
|
+
|
|
154
|
+
**源:BE 20 事务边界协议**
|
|
155
|
+
|
|
156
|
+
事务边界是需要原子提交或一致失败的一组本地持久化操作。
|
|
157
|
+
|
|
158
|
+
**源:BE 21 并发与锁协议**
|
|
159
|
+
|
|
160
|
+
竞争窗口是多个执行者可基于同一旧状态作出冲突决策的时间范围。
|
|
161
|
+
|
|
162
|
+
**源:BE 22 幂等协议**
|
|
163
|
+
|
|
164
|
+
幂等键标识同一业务意图,而不是单次网络请求。
|
|
165
|
+
|
|
166
|
+
**源:BE 23 缓存与 Redis 一致性协议**
|
|
167
|
+
|
|
168
|
+
权威数据源是在冲突时决定业务事实的持久来源。
|
|
169
|
+
|
|
170
|
+
## MUST
|
|
171
|
+
|
|
172
|
+
**源:BE 14 业务规则与状态协议 · §MUST**
|
|
173
|
+
|
|
174
|
+
- 状态转移必须定义前置条件、权限、效果、失败码和并发行为。
|
|
175
|
+
|
|
176
|
+
**源:BE 15 数据模型协议 · §MUST**
|
|
177
|
+
|
|
178
|
+
- 每次转换必须明确字段来源、空值、默认值、精度、时间和枚举语义。
|
|
179
|
+
|
|
180
|
+
**源:BE 18 数据库 Schema 与迁移协议 · §MUST**
|
|
181
|
+
|
|
182
|
+
- 每次 schema 变化必须有前向迁移、兼容分析、验证和回退或 roll-forward 路径。
|
|
183
|
+
|
|
184
|
+
**源:BE 19 查询、索引与 SQL 协议 · §MUST**
|
|
185
|
+
|
|
186
|
+
- SQL 必须参数化,并以真实查询形态验证结果、边界和执行计划。
|
|
187
|
+
|
|
188
|
+
**源:BE 20 事务边界协议 · §MUST**
|
|
189
|
+
|
|
190
|
+
- 写流程必须明确事务入口、隔离、传播、失败、重试和提交后动作。
|
|
191
|
+
|
|
192
|
+
**源:BE 21 并发与锁协议 · §MUST**
|
|
193
|
+
|
|
194
|
+
- 并发写必须明确竞争对象、原子条件、冲突结果、重试与最终一致性。
|
|
195
|
+
|
|
196
|
+
**源:BE 22 幂等协议 · §MUST**
|
|
197
|
+
|
|
198
|
+
- 可重试写操作必须定义 key 范围、请求指纹、保留期、并发和响应重放。
|
|
199
|
+
|
|
200
|
+
**源:BE 23 缓存与 Redis 一致性协议 · §MUST**
|
|
201
|
+
|
|
202
|
+
- 缓存必须定义 key 维度、权限隔离、TTL、更新失效、故障和恢复行为。
|
|
203
|
+
|
|
204
|
+
## MUST NOT
|
|
205
|
+
|
|
206
|
+
**源:BE 14 业务规则与状态协议 · §MUST NOT**
|
|
207
|
+
|
|
208
|
+
- 不得只依赖前端禁用按钮或流程顺序维护业务不变量。
|
|
209
|
+
|
|
210
|
+
**源:BE 15 数据模型协议 · §MUST NOT**
|
|
211
|
+
|
|
212
|
+
- 不得让 API DTO、ORM Entity 与领域模型无条件共用同一类型。
|
|
213
|
+
|
|
214
|
+
**源:BE 18 数据库 Schema 与迁移协议 · §MUST NOT**
|
|
215
|
+
|
|
216
|
+
- 不得依赖 ORM 自动改表、手工生产操作或无记录脚本作为正式迁移。
|
|
217
|
+
|
|
218
|
+
**源:BE 19 查询、索引与 SQL 协议 · §MUST NOT**
|
|
219
|
+
|
|
220
|
+
- 不得用字符串拼接构造不可信 SQL 或无界读取大结果集。
|
|
221
|
+
|
|
222
|
+
**源:BE 20 事务边界协议 · §MUST NOT**
|
|
223
|
+
|
|
224
|
+
- 不得在长事务中执行无界网络调用、用户等待或不可控批处理。
|
|
225
|
+
|
|
226
|
+
**源:BE 21 并发与锁协议 · §MUST NOT**
|
|
227
|
+
|
|
228
|
+
- 不得把进程内锁用于跨实例互斥或忽略锁超时与所有权。
|
|
229
|
+
|
|
230
|
+
**源:BE 22 幂等协议 · §MUST NOT**
|
|
231
|
+
|
|
232
|
+
- 不得仅依赖客户端防抖、按钮禁用或短时进程内缓存。
|
|
233
|
+
|
|
234
|
+
**源:BE 23 缓存与 Redis 一致性协议 · §MUST NOT**
|
|
235
|
+
|
|
236
|
+
- 不得让不同租户、权限、过滤或版本的数据共享含混 key。
|
|
237
|
+
|
|
238
|
+
## SHOULD
|
|
239
|
+
|
|
240
|
+
**源:BE 14 业务规则与状态协议 · §SHOULD**
|
|
241
|
+
|
|
242
|
+
- 应集中表达同一权威规则并覆盖边界与非法转移测试。
|
|
243
|
+
|
|
244
|
+
**源:BE 15 数据模型协议 · §SHOULD**
|
|
245
|
+
|
|
246
|
+
- 应只在边界转换一次,并通过契约或 round-trip 测试验证。
|
|
247
|
+
|
|
248
|
+
**源:BE 18 数据库 Schema 与迁移协议 · §SHOULD**
|
|
249
|
+
|
|
250
|
+
- 应采用 expand/migrate/contract,避免应用与数据库无法并行部署。
|
|
251
|
+
|
|
252
|
+
**源:BE 19 查询、索引与 SQL 协议 · §SHOULD**
|
|
253
|
+
|
|
254
|
+
- 应让索引服务于已知查询,并记录写放大与存储取舍。
|
|
255
|
+
|
|
256
|
+
**源:BE 20 事务边界协议 · §SHOULD**
|
|
257
|
+
|
|
258
|
+
- 应缩短锁持有时间,并将外部副作用设计为可重试或可补偿。
|
|
259
|
+
|
|
260
|
+
**源:BE 21 并发与锁协议 · §SHOULD**
|
|
261
|
+
|
|
262
|
+
- 应优先使用数据库约束或带版本条件的原子更新保护不变量。
|
|
263
|
+
|
|
264
|
+
**源:BE 22 幂等协议 · §SHOULD**
|
|
265
|
+
|
|
266
|
+
- 应对相同 key 不同 payload 返回稳定冲突,而非重复执行。
|
|
267
|
+
|
|
268
|
+
**源:BE 23 缓存与 Redis 一致性协议 · §SHOULD**
|
|
269
|
+
|
|
270
|
+
- 应设计缓存穿透、击穿、雪崩和热 key 的限制与观测。
|
|
271
|
+
|
|
272
|
+
## Contract
|
|
273
|
+
|
|
274
|
+
**源:BE 14 业务规则与状态协议 · §Contract**
|
|
275
|
+
|
|
276
|
+
规则设计必须绑定 BP 来源、输入、状态、输出、失败和证据。
|
|
277
|
+
|
|
278
|
+
**源:BE 15 数据模型协议 · §Contract**
|
|
279
|
+
|
|
280
|
+
映射必须声明源、目标、必填性、丢失规则和失败行为。
|
|
281
|
+
|
|
282
|
+
**源:BE 18 数据库 Schema 与迁移协议 · §Contract**
|
|
283
|
+
|
|
284
|
+
迁移记录必须包含对象、影响数据、锁风险、顺序、验证、修复和恢复。
|
|
285
|
+
|
|
286
|
+
**源:BE 19 查询、索引与 SQL 协议 · §Contract**
|
|
287
|
+
|
|
288
|
+
关键查询必须记录输入、排序稳定性、分页语义、索引和验证数据规模。
|
|
289
|
+
|
|
290
|
+
**源:BE 20 事务边界协议 · §Contract**
|
|
291
|
+
|
|
292
|
+
事务设计必须列出读写集合、锁、唯一约束、外部调用和一致性证据。
|
|
293
|
+
|
|
294
|
+
**源:BE 21 并发与锁协议 · §Contract**
|
|
295
|
+
|
|
296
|
+
锁设计必须记录粒度、顺序、超时、续租、释放、失败和可观测性。
|
|
297
|
+
|
|
298
|
+
**源:BE 22 幂等协议 · §Contract**
|
|
299
|
+
|
|
300
|
+
幂等记录必须包含主体、操作、key、指纹、状态、结果与过期语义。
|
|
301
|
+
|
|
302
|
+
**源:BE 23 缓存与 Redis 一致性协议 · §Contract**
|
|
303
|
+
|
|
304
|
+
缓存契约必须包含权威源、schema 版本、读写顺序、陈旧容忍和降级。
|
|
305
|
+
|
|
306
|
+
## Checklist
|
|
307
|
+
|
|
308
|
+
**源:BE 14 业务规则与状态协议 · §Checklist**
|
|
309
|
+
|
|
310
|
+
- [ ] 不变量、状态、权限、事务与并发边界已对齐。
|
|
311
|
+
|
|
312
|
+
**源:BE 15 数据模型协议 · §Checklist**
|
|
313
|
+
|
|
314
|
+
- [ ] 新增字段已追踪到所有生产、转换、存储与消费边界。
|
|
315
|
+
|
|
316
|
+
**源:BE 18 数据库 Schema 与迁移协议 · §Checklist**
|
|
317
|
+
|
|
318
|
+
- [ ] 约束、索引、默认值、历史数据、备份与发布窗口已检查。
|
|
319
|
+
|
|
320
|
+
**源:BE 19 查询、索引与 SQL 协议 · §Checklist**
|
|
321
|
+
|
|
322
|
+
- [ ] 空结果、重复排序键、深分页、N+1 与慢查询已检查。
|
|
323
|
+
|
|
324
|
+
**源:BE 20 事务边界协议 · §Checklist**
|
|
325
|
+
|
|
326
|
+
- [ ] 异常、超时、重试、部分失败和提交后发布均已测试。
|
|
327
|
+
|
|
328
|
+
**源:BE 21 并发与锁协议 · §Checklist**
|
|
329
|
+
|
|
330
|
+
- [ ] 重复请求、乱序、死锁、超时、崩溃和多实例场景已测试。
|
|
331
|
+
|
|
332
|
+
**源:BE 22 幂等协议 · §Checklist**
|
|
333
|
+
|
|
334
|
+
- [ ] 并发首请求、失败重试、超时、重放和过期边界已测试。
|
|
335
|
+
|
|
336
|
+
**源:BE 23 缓存与 Redis 一致性协议 · §Checklist**
|
|
337
|
+
|
|
338
|
+
- [ ] DB 提交、缓存失败、并发更新、淘汰和重建已测试。
|
|
339
|
+
|
|
340
|
+
## Examples
|
|
341
|
+
|
|
342
|
+
**源:BE 14 业务规则与状态协议 · §Examples**
|
|
343
|
+
|
|
344
|
+
- 审批操作在服务端校验当前状态与操作权限后原子更新。
|
|
345
|
+
|
|
346
|
+
**源:BE 15 数据模型协议 · §Examples**
|
|
347
|
+
|
|
348
|
+
- API 字符串枚举在入口转换为受控领域值,未知值返回稳定错误。
|
|
349
|
+
|
|
350
|
+
**源:BE 18 数据库 Schema 与迁移协议 · §Examples**
|
|
351
|
+
|
|
352
|
+
- 先新增可空字段并双写,完成回填与读切换后再收紧约束。
|
|
353
|
+
|
|
354
|
+
**源:BE 19 查询、索引与 SQL 协议 · §Examples**
|
|
355
|
+
|
|
356
|
+
- 游标分页包含稳定唯一排序键并验证并发写入下的行为。
|
|
357
|
+
|
|
358
|
+
**源:BE 20 事务边界协议 · §Examples**
|
|
359
|
+
|
|
360
|
+
- 本地事务写入 outbox,提交后由可靠发布器发送外部消息。
|
|
361
|
+
|
|
362
|
+
**源:BE 21 并发与锁协议 · §Examples**
|
|
363
|
+
|
|
364
|
+
- 以版本号条件更新并将零行更新映射为稳定冲突错误。
|
|
365
|
+
|
|
366
|
+
**源:BE 22 幂等协议 · §Examples**
|
|
367
|
+
|
|
368
|
+
- 回调以供应方事件 ID 和租户范围去重,并原子保存处理结果。
|
|
369
|
+
|
|
370
|
+
**源:BE 23 缓存与 Redis 一致性协议 · §Examples**
|
|
371
|
+
|
|
372
|
+
- 写库提交后删除版本化缓存,读路径在 miss 时受控回源。
|
|
373
|
+
|
|
374
|
+
## Anti-patterns
|
|
375
|
+
|
|
376
|
+
**源:BE 14 业务规则与状态协议 · §Anti-patterns**
|
|
377
|
+
|
|
378
|
+
- 在多个 Controller 和 SQL 中复制略有差异的状态判断。
|
|
379
|
+
|
|
380
|
+
**源:BE 15 数据模型协议 · §Anti-patterns**
|
|
381
|
+
|
|
382
|
+
- 使用反射复制掩盖字段语义、精度或空值差异。
|
|
383
|
+
|
|
384
|
+
**源:BE 18 数据库 Schema 与迁移协议 · §Anti-patterns**
|
|
385
|
+
|
|
386
|
+
- 在同一步中删除旧字段并发布仍依赖它的应用版本。
|
|
387
|
+
|
|
388
|
+
**源:BE 19 查询、索引与 SQL 协议 · §Anti-patterns**
|
|
389
|
+
|
|
390
|
+
- 仅凭列名添加索引,不检查选择性和实际执行计划。
|
|
391
|
+
|
|
392
|
+
**源:BE 20 事务边界协议 · §Anti-patterns**
|
|
393
|
+
|
|
394
|
+
- 通过扩大事务范围掩盖跨系统一致性设计缺失。
|
|
395
|
+
|
|
396
|
+
**源:BE 21 并发与锁协议 · §Anti-patterns**
|
|
397
|
+
|
|
398
|
+
- 先查询再无条件更新,并假设请求不会并发。
|
|
399
|
+
|
|
400
|
+
**源:BE 22 幂等协议 · §Anti-patterns**
|
|
401
|
+
|
|
402
|
+
- 用当前时间生成幂等键,使每次重试都成为新操作。
|
|
403
|
+
|
|
404
|
+
**源:BE 23 缓存与 Redis 一致性协议 · §Anti-patterns**
|
|
405
|
+
|
|
406
|
+
- 先写缓存再写数据库且没有补偿或一致性说明。
|
|
407
|
+
|
|
408
|
+
## Ownership
|
|
409
|
+
|
|
410
|
+
**源:BE 14 业务规则与状态协议 · §Ownership**
|
|
411
|
+
|
|
412
|
+
BP 拥有业务语义,Backend 拥有服务端一致实现。
|
|
413
|
+
|
|
414
|
+
**源:BE 15 数据模型协议 · §Ownership**
|
|
415
|
+
|
|
416
|
+
各边界 Owner 维护模型契约,映射实现者负责 round-trip 证据。
|
|
417
|
+
|
|
418
|
+
**源:BE 18 数据库 Schema 与迁移协议 · §Ownership**
|
|
419
|
+
|
|
420
|
+
数据 Owner 审批语义,Backend 维护 migration 与验证证据。
|
|
421
|
+
|
|
422
|
+
**源:BE 19 查询、索引与 SQL 协议 · §Ownership**
|
|
423
|
+
|
|
424
|
+
查询维护者提供计划证据,数据 Owner 评审容量与一致性影响。
|
|
425
|
+
|
|
426
|
+
**源:BE 20 事务边界协议 · §Ownership**
|
|
427
|
+
|
|
428
|
+
应用服务拥有事务编排,Repository 提供明确持久化语义。
|
|
429
|
+
|
|
430
|
+
**源:BE 21 并发与锁协议 · §Ownership**
|
|
431
|
+
|
|
432
|
+
业务用例 Owner 定义冲突语义,持久化维护者验证原子性。
|
|
433
|
+
|
|
434
|
+
**源:BE 22 幂等协议 · §Ownership**
|
|
435
|
+
|
|
436
|
+
API 或任务 Owner 定义业务意图,存储实现维护原子去重。
|
|
437
|
+
|
|
438
|
+
**源:BE 23 缓存与 Redis 一致性协议 · §Ownership**
|
|
439
|
+
|
|
440
|
+
数据 Owner 定义一致性,缓存维护者提供失效与恢复证据。
|
|
441
|
+
|
|
442
|
+
## Change Policy
|
|
443
|
+
|
|
444
|
+
**源:BE 14 业务规则与状态协议 · §Change Policy**
|
|
445
|
+
|
|
446
|
+
业务语义变化必须来自正式 delta,并同步状态迁移与兼容计划。
|
|
447
|
+
|
|
448
|
+
**源:BE 15 数据模型协议 · §Change Policy**
|
|
449
|
+
|
|
450
|
+
模型变化必须评估 API、数据、消息和历史数据兼容性。
|
|
451
|
+
|
|
452
|
+
**源:BE 18 数据库 Schema 与迁移协议 · §Change Policy**
|
|
453
|
+
|
|
454
|
+
已执行 migration 不得原地改写;修正必须追加新 migration。
|
|
455
|
+
|
|
456
|
+
**源:BE 19 查询、索引与 SQL 协议 · §Change Policy**
|
|
457
|
+
|
|
458
|
+
索引删除或查询重写必须先验证所有已知消费者和回滚路径。
|
|
459
|
+
|
|
460
|
+
**源:BE 20 事务边界协议 · §Change Policy**
|
|
461
|
+
|
|
462
|
+
边界或隔离变化必须复核并发、锁、性能和失败恢复。
|
|
463
|
+
|
|
464
|
+
**源:BE 21 并发与锁协议 · §Change Policy**
|
|
465
|
+
|
|
466
|
+
锁策略变化必须重新评估事务、性能、恢复和兼容行为。
|
|
467
|
+
|
|
468
|
+
**源:BE 22 幂等协议 · §Change Policy**
|
|
469
|
+
|
|
470
|
+
key 格式或保留期变化必须处理旧记录和滚动发布兼容。
|
|
471
|
+
|
|
472
|
+
**源:BE 23 缓存与 Redis 一致性协议 · §Change Policy**
|
|
473
|
+
|
|
474
|
+
value schema 或 key 变化必须版本化并规划旧数据清理。
|
|
475
|
+
|
|
476
|
+
## 语言与栈节(overlay 资产同步区)
|
|
477
|
+
|
|
478
|
+
> 本区各小节 = stacks/ overlay 资产 Scope/Rules/Checklist 的**逐字节同步副本**(标题降 2 级,正文零改动)。资产层(overlay 文件,catalog 在册、research 锚、bound 语义挂点)为唯一权威;本区为注入面副本,改规则只改 overlay、本区随同步。x-research-anchors 留在 overlay 资产 frontmatter,不复制进本主题文档(防双锚漂移)。
|
|
479
|
+
|
|
480
|
+
### java(源:stacks/java/java-language-overlay.md · B01 次挂点,主挂点 T05)
|
|
481
|
+
|
|
482
|
+
#### Scope
|
|
483
|
+
|
|
484
|
+
本 Overlay 具体化 Java 源码、构建、JDK 与 JVM 兼容边界。
|
|
485
|
+
|
|
486
|
+
#### Rules
|
|
487
|
+
|
|
488
|
+
- 必须固定并记录 JDK、编译目标、构建工具和依赖解析来源。
|
|
489
|
+
- 不得由 Java 选择推断 Spring Boot、数据库、Redis、Nginx 或 Tomcat。
|
|
490
|
+
- 语言升级必须验证字节码、运行时、测试与部署环境兼容性。
|
|
491
|
+
|
|
492
|
+
#### Checklist
|
|
493
|
+
|
|
494
|
+
- [ ] 版本来源、构建命令和 CI 运行时可复现。
|
|
495
|
+
- [ ] 项目技术基线记录实际 JDK 与打包方式。
|
|
496
|
+
|
|
497
|
+
### jpa(源:stacks/jpa/jpa-persistence-overlay.md · B01 主挂点)
|
|
498
|
+
|
|
499
|
+
#### Scope
|
|
500
|
+
|
|
501
|
+
本 Overlay 具体化实体生命周期、关联加载、查询与持久化上下文边界。
|
|
502
|
+
|
|
503
|
+
#### Rules
|
|
504
|
+
|
|
505
|
+
- Entity 不得直接替代 API DTO 或领域契约。
|
|
506
|
+
- 必须验证关联加载、N+1、脏检查、批处理和事务边界。
|
|
507
|
+
- 与 MyBatis 并存时必须声明模块或数据源范围。
|
|
508
|
+
|
|
509
|
+
#### Checklist
|
|
510
|
+
|
|
511
|
+
- [ ] Java 依赖已显式选择。
|
|
512
|
+
- [ ] schema、迁移和实体映射不存在未经解释的漂移。
|
|
513
|
+
|
|
514
|
+
### mybatis(源:stacks/mybatis/mybatis-persistence-overlay.md · B01 主挂点)
|
|
515
|
+
|
|
516
|
+
#### Scope
|
|
517
|
+
|
|
518
|
+
本 Overlay 具体化 Mapper、SQL 映射、结果映射和动态 SQL 边界。
|
|
519
|
+
|
|
520
|
+
#### Rules
|
|
521
|
+
|
|
522
|
+
- SQL 必须参数化并绑定可复核的 Mapper 与测试坐标。
|
|
523
|
+
- 动态条件、分页、批处理和结果映射必须覆盖空值与类型边界。
|
|
524
|
+
- 与 JPA 并存时必须声明模块或数据源范围。
|
|
525
|
+
|
|
526
|
+
#### Checklist
|
|
527
|
+
|
|
528
|
+
- [ ] Java 依赖已显式选择。
|
|
529
|
+
- [ ] SQL、索引、事务和迁移证据相互一致。
|
|
530
|
+
|
|
531
|
+
### mysql(源:stacks/mysql/mysql-database-overlay.md · B01 主挂点)
|
|
532
|
+
|
|
533
|
+
#### Scope
|
|
534
|
+
|
|
535
|
+
本 Overlay 具体化 MySQL schema、InnoDB、索引、事务与迁移验证边界。
|
|
536
|
+
|
|
537
|
+
#### Rules
|
|
538
|
+
|
|
539
|
+
- 字符集、排序规则、类型、约束和索引必须由 migration 明确表达。
|
|
540
|
+
- 隔离级别、锁行为和执行计划必须以实际版本证据为准。
|
|
541
|
+
- 与其他数据库并存时必须声明数据源与数据所有权。
|
|
542
|
+
|
|
543
|
+
#### Checklist
|
|
544
|
+
|
|
545
|
+
- [ ] migration、rollback 或 roll-forward 路径可验证。
|
|
546
|
+
- [ ] 生产兼容性不依赖本地默认值。
|
|
547
|
+
|
|
548
|
+
### postgresql(源:stacks/postgresql/postgresql-database-overlay.md · B01 主挂点)
|
|
549
|
+
|
|
550
|
+
#### Scope
|
|
551
|
+
|
|
552
|
+
本 Overlay 具体化 PostgreSQL schema、类型、索引、事务与迁移验证边界。
|
|
553
|
+
|
|
554
|
+
#### Rules
|
|
555
|
+
|
|
556
|
+
- schema、extension、类型、约束和索引必须由受控 migration 表达。
|
|
557
|
+
- 锁、隔离、执行计划和 vacuum 相关判断必须绑定实际版本证据。
|
|
558
|
+
- 与其他数据库并存时必须声明数据源与数据所有权。
|
|
559
|
+
|
|
560
|
+
#### Checklist
|
|
561
|
+
|
|
562
|
+
- [ ] migration 与兼容窗口可复核。
|
|
563
|
+
- [ ] SQL 未依赖未声明的 search path 或环境默认值。
|
|
564
|
+
|
|
565
|
+
### redis(源:stacks/redis/redis-cache-overlay.md · B01 主挂点)
|
|
566
|
+
|
|
567
|
+
#### Scope
|
|
568
|
+
|
|
569
|
+
本 Overlay 具体化 Redis key、value schema、TTL、原子操作与故障降级边界。
|
|
570
|
+
|
|
571
|
+
#### Rules
|
|
572
|
+
|
|
573
|
+
- key namespace、租户范围、序列化版本和 TTL 必须显式定义。
|
|
574
|
+
- Redis 不得成为未声明的数据权威来源。
|
|
575
|
+
- 分布式锁、缓存失效和降级必须有失败语义与测试证据。
|
|
576
|
+
|
|
577
|
+
#### Checklist
|
|
578
|
+
|
|
579
|
+
- [ ] 一致性、容量、淘汰和恢复路径已记录。
|
|
580
|
+
- [ ] 敏感数据与日志处理满足安全和隐私协议。
|
|
581
|
+
|
|
582
|
+
> **缺席诚实**:php / python(后端语言)与 oracle / sqlserver(关系数据库)无 overlay 资产,不落语言节。
|