Tiến độ hardening v0.2.1¶
Cập nhật gần nhất: 2026-10-15. Nhánh làm việc:
release/v0.2.1-hardening. Tài liệu này ghi nhận bằng chứng đã thực thi; trạng
thái PARTIAL không được hiểu là đã đạt toàn bộ acceptance criteria.
Audit và trạng thái¶
| Task | Trạng thái | Bằng chứng hiện tại | Khoảng trống tiếp theo |
|---|---|---|---|
| SEC-01 | PASS | Commit eae29c9; production validators và 25 test liên quan đã pass |
Không |
| SEC-02 | PASS | Commit bb8e27a; cookie/CSRF/header/Ingress TLS; full API 165 pass, web build pass |
Không |
| SEC-03 | PASS | TLS/mTLS và SASL PLAIN/SCRAM trên 2 client: 22 checks; authenticated source/sink JDBC 4/4; API/log redaction pass | Target broker identities/ACLs vẫn cần operator validation |
| SEC-04 | PASS | Commit fdcfdf2; lifecycle/redaction/rotation/Kubernetes secret boundary; 53 test pass |
Không |
| SEC-05 | PASS | Commit 8c377c9; distributed login throttle, session invalidation, RBAC route matrix; full API 178 pass |
Không |
| CDC-01 | PASS | Live 4x JDBC matrix và MinIO c/u/d JSONL đã pass; reusable reconciliation utility |
Chỉ các kiểu portable được kiểm chứng; giới hạn engine-specific đã ghi tài liệu |
| CDC-02 | PASS | Live connector/task/Connect/API/worker/Kafka/source restart matrix; identity/config/offset continuity và no-resnapshot assertions | Không; mất position vẫn yêu cầu explicit operator recovery |
| CDC-03 | PASS | Live add/remove/resnapshot/restart/cancel matrix; schema compatibility history and unsupported-type rejection; 36 focused tests pass | Không |
| CDC-04 | PASS | Live PostgreSQL slot/WAL và MySQL binlog retention/position checks; permission-limited tests; critical alert lifecycle | Không |
| REL-01 | PASS | Per-resource worker isolation; desired/observed state safety; live Connect/API/worker/source/destination fault matrix và catch-up pass | Không |
| REL-02 | PASS | Durable error classification/history; bounded exponential backoff+jitter; permanent-stop và manual retry | Không |
| REL-03 | PASS | Deterministic deploy/adoption; connector operation lease; duplicate operation suppression; PostgreSQL race pass | Không |
| OPS-01 | PASS | Custom pg_dump + checksum/manifest; guarded isolated restore; migration và encrypted-secret verification live pass | Không |
| OPS-02 | PASS | Guarded preflight/upgrade; populated v0.2.0 0003 → 0006 identity/ciphertext preservation và idempotency pass |
Không |
| OPS-03 | PASS | Schema 11/11 valid; read-only runtime/SIGTERM; kind/Calico/NGINX rollout 2x mỗi tier, external PostgreSQL, HTTPS/login/CSRF và CNI allow/deny/revocation pass | Target sizing/identities/availability cần operator review |
| TEST-01 | PASS | Clean immutable c75e0f1: prebuilt browser/live gate 14/14 PASS, cleanup PASS; API 269/269; web 48/48; workflow wiring/actionlint pass |
Remote CI commit cuối vẫn bắt buộc; warm-cache speedup chưa đo |
Công việc còn lại¶
Không còn task implementation dở dang trong SEC-01 → TEST-01. Bước tiếp theo là maintainer chạy remote workflow trên release commit cuối và operator duyệt target environment trước promotion; không thực hiện push/tag/publish tự động.
Không có thay đổi API phá vỡ tương thích được dự kiến. Các test live chỉ dùng Compose project hoặc Kubernetes cluster cô lập; không được chạy vào hạ tầng dùng chung. Tại mốc này, ClueCDC là control plane và chưa đưa CDC payload qua API.
Ghi chú lịch sử: đây là ranh giới của mốc v0.2.1. Phiên bản hiện tại có trình đọc mẫu CDC gần nhất, có giới hạn và không commit offset; xem Kafka topics.
Kết quả CDC-01¶
python -m pytest apps/api/tests/test_cdc_reconciliation.py -q: 3 pass.python -m ruff check ...: pass cho các file CDC-01.scripts/cdc-integrity.py: 4/4 cặp PostgreSQL/MySQL source → PostgreSQL/MySQL JDBC destination pass trên stack Compose thực.scripts/demo-object-storage.py: MinIO gzip JSONL chứa đúng keyedc/u/d, before/after, timestamp và source metadata.- Artifact cục bộ:
artifacts/cdc-integrity.jsonvàartifacts/object-storage-verification.json(được git-ignore).
Semantics được xác nhận là at-least-once. JDBC upsert với stable key cho trạng thái materialized idempotent khi replay; object storage là event log và có thể có duplicate. Không tuyên bố exactly-once toàn cục.
Kết quả CDC-02¶
- Restart source connector và individual source/sink task: pass.
- Restart Kafka Connect worker: connector names/config giữ nguyên, row mới được giao sau retained offsets: pass.
- Restart API và worker: data plane không bị recreate, row mới được giao: pass.
- Kafka tạm ngắt trong khi WAL có mutation và PostgreSQL source restart: tự phục hồi, không mất row: pass.
- Số initial snapshot
READevent trước/sau không tăng; tổng số connector không đổi; implicitreset-offsetsbị từ chối: pass. - Artifact cục bộ:
artifacts/cdc-recovery.json(được git-ignore).
Kết quả CDC-03¶
- Snapshot ban đầu, thêm bảng với backfill/stream và cô lập bảng ngoài scope: pass.
- Resnapshot sửa state destination bị thay đổi thủ công: pass.
- Restart Kafka Connect trong snapshot 5.000 dòng, sau đó đối soát đủ dữ liệu: pass.
- Hủy snapshot ghi nhận trạng thái
CANCELLED; remove-table đồng thời bị chặn: pass. - Remove-table giữ dữ liệu destination và không ảnh hưởng bảng còn capture: pass.
- Thêm cột nullable/có default, refresh mapping và resnapshot explicit: pass; cột mới được tạo nullable ở destination để không suy diễn default của source.
- Widening được phân loại non-breaking; drop, incompatible type và primary-key
change được phân loại breaking; array bị từ chối bằng
DELIVERY_TYPE_UNSUPPORTED. python -m pytest apps/api/tests/test_destinations.py apps/api/tests/test_services.py apps/api/tests/test_phase1_lifecycle.py -q: 36 pass.- Full API regression: 198 pass, 4 skip; Ruff, mypy và MkDocs strict: pass.
- Artifact cục bộ:
artifacts/cdc-schema-safety.json(được git-ignore).
Kết quả CDC-04¶
- PostgreSQL readiness inventory logical slot, trạng thái active/
wal_status,restart_lsnvà retained WAL bytes: pass trên source thật. - Slot probe inactive được cảnh báo nhưng vẫn tồn tại sau readiness; cleanup chỉ do acceptance harness thực hiện với đúng UUID-scoped slot: pass.
- MySQL đọc đúng retention 604.800 giây, current position, file inventory và tổng bytes; outage objective 700.000 giây tạo retention risk: pass.
- Retention risk tạo critical alert; objective an toàn ở lần health kế tiếp resolve đúng alert: pass.
- Query monitoring thiếu quyền trả warning có hướng dẫn, không biến source thành unavailable; unit tests PostgreSQL/MySQL: pass.
- Full API regression: 204 pass, 4 skip; web 48 pass; Ruff, mypy, ESLint, TypeScript, Prettier và MkDocs strict: pass.
- Artifact cục bộ:
artifacts/cdc-retention-safety.json(được git-ignore).
Kết quả REL-01¶
- Lỗi bất ngờ khi reconcile một pipeline/delivery được cô lập theo resource; pipeline khác và snapshot notification trong cùng worker cycle vẫn chạy.
- Khi Connect REST unavailable, observed state chuyển
UNKNOWNtrong khi desiredPAUSEDvà table pause state được giữ nguyên: pass. - Restart Connect, API và ClueCDC worker không làm mất manual pause; resume hội
tụ lại
RUNNING: pass. - Source outage trả
SOURCE_UNAVAILABLEvà health phục hồi sau restart: pass. - Destination outage trả
DESTINATION_UNAVAILABLE, sink failure hiển thị và row phát sinh trong outage được catch up sau explicit delivery restart: pass. - Connector count, identity và config không đổi; không auto recreate hay reset offsets: pass.
- Focused API tests: 28 pass, 1 skip; full API regression: 211 pass, 4 skip;
web: 48 pass; Ruff, format, mypy và MkDocs strict: pass. Live artifact cục bộ:
artifacts/cdc-failure-recovery.json(được git-ignore).
Kết quả REL-02¶
- Job failure được phân loại thành transient connectivity, resource exhaustion, authentication, invalid configuration, schema incompatibility, missing source history hoặc unknown; log có code/category/retryable nhưng không ghi raw exception ngoài contract an toàn.
- Retryable failure và expired lease dùng exponential backoff có positive jitter, cap và maximum attempts cấu hình; permanent category dừng ngay: pass.
- Job API hiển thị attempt count, last/next timestamp, current classification và tối đa 20 failure records; manual retry reset attempt cycle nhưng giữ history: pass.
- Connector/task restart vẫn là explicit operator action; task trace và root-cause alert được giữ lại, không có blind automatic connector restart.
- Focused tests: 36 pass, 1 skip; full API regression: 216 pass, 4 skip; web:
48 pass; Ruff, format, mypy và MkDocs strict: pass. PostgreSQL migration
0005upgrade/check và column inventory trên stack thật: pass.
Kết quả REL-03¶
- Capture và delivery deploy dùng deterministic connector identity; retry sau partial external creation chỉ adopt khi raw config exact-match, config khác bị chặn và không overwrite: pass.
- Compensation chỉ xóa connector do request hiện tại tạo và chưa có metadata owner; destination/Connect I/O không giữ metadata transaction/row lock.
- Pause/resume/restart/delete được serialize bằng expiring connector-operation lease; stale owner sau API crash có thể được thay thế an toàn.
- Table operation đang
RUNNINGkhông bị duplicate Job chạy lại; manual retry tái sử dụng pending automatic Job; stale execution tiếp tục từ durable checkpoints sau job lease. - Focused concurrency/lifecycle tests: 52 pass; PostgreSQL two-session operation
race: đúng một winner và một
CONNECTOR_OPERATION_ACTIVE; migration0006upgrade/check: pass. - Live REL-01 recovery matrix chạy lại sau các thay đổi: pass, connector identity/config và metadata vẫn ổn định.
- Full API regression: 220 pass, 4 skip; web: 48 pass; Ruff, format, mypy và MkDocs strict: pass.
Kết quả OPS-01¶
metadata_backup.py backupchạy trên populated PostgreSQL thật, dùng custom archive,pg_restore --list, SHA-256/size manifest và Alembic revision: pass.- Manifest chỉ giữ fingerprint một chiều của
SECRET_ENCRYPTION_KEY; database URL/password/key không nằm trong artifact metadata hoặc process arguments. - Restore vào database rỗng cô lập,
alembic upgrade head,alembic check, counts cho users/connections/pipelines/deliveries/audit và decrypt đủ 10 secret references với đúng key: pass. - Sai key và target đã có tables đều fail closed; target name confirmation là bắt buộc; script không tự drop/overwrite database.
- Database restore test đã được xác nhận đúng tên rồi xóa; metadata database và persistent volumes chính không bị xóa hay reset.
- Focused backup guard tests: 4 pass; full API regression: 224 pass, 4 skip; Ruff, format, mypy, repository safety và MkDocs strict: pass.
Kết quả OPS-02¶
- Populated fixture ở released v0.2.0 revision
0003: 1 user, 1 session, 1 invite, 10 connections, 10 pipelines, 12 deliveries, 10 secret references, 548 alerts và 970 audit entries. - Preflight xác minh supported revision và decrypt toàn bộ secret; upgrade yêu cầu backup có checksum/key fingerprint hợp lệ.
- Upgrade
0003→0006,alembic check, counts, ID-set hashes và ciphertext hashes trước/sau: pass; chạy lại0006→0006: idempotent pass. - Unknown revision và metadata identity drift fail closed trong unit tests; lỗi upgrade hướng dẫn restore verified backup vào database rỗng, không auto downgrade hay sửa database tại chỗ.
- Database fixture đã được xác nhận đúng tên rồi xóa; database chính không bị downgrade, reset hoặc thay đổi dữ liệu.
- Focused backup/upgrade tests: 7 pass; full API regression: 227 pass, 4 skip; Ruff, format, mypy, repository safety và MkDocs strict: pass.
Kết quả OPS-03¶
- Kustomize production base chỉ render web/API/worker, dùng external PostgreSQL, Kafka và Kafka Connect; dependency manifests cũ giữ làm development reference.
- Restricted pod admission, explicit non-root UID/GID, RuntimeDefault seccomp,
drop ALL capabilities, no privilege escalation, read-only root filesystem và
bounded temporary/cache volumes; image version
0.2.1và Secret refs. - Hai replica mỗi application tier, probes startup/readiness/liveness, resource requests/limits và 30 giây shutdown grace; API drain tối đa 25 giây.
- Default-deny ingress; chỉ ingress controller vào web, web/approved private Connect/monitoring vào API; production docs có external dependency setup, callback URL, overlay và migration/backup procedure.
- Kustomize render và production policy validation: pass. Kubeconform v0.7.0 strict: 11 valid, 0 invalid, 0 errors, 0 skipped.
deployment_runtime.pytạo PostgreSQL/network/container UUID-scoped với random production secrets: migration, API/worker/web readiness, filesystem chỉ-đọc và SIGTERM trong 30 giây: pass. Tài nguyên test đã được cleanup chính xác.- Live Kubernetes evidence đã bổ sung bên dưới; schema/Docker runtime pass được ghi nhận tách riêng với CNI enforcement và HTTPS ingress.
- Full API regression: 230 pass, 4 skip; focused security/logout: 27 pass;
Ruff/format, mypy, repository safety và MkDocs strict: pass. Regression phát
hiện logout thiếu auth dependency đã sửa trong commit
3f4aa6e. - Kiểm tra rendered selectors phát hiện global Kustomize labels bị chèn vào selector của ingress controller/Connect ngoài namespace. Đã giới hạn label transformer vào metadata/templates, bổ sung regression tests và policy validation cho private API, default deny và Secret của từng container.
- kind v0.29.0 / Kubernetes v1.33.1, Calico v3.30.3 và NGINX v1.13.3 trong cluster tạm có kubeconfig riêng: 2 API + 2 worker + 2 web rollout pass; PostgreSQL nằm ngoài cluster, random Secret qua stdin, migration/drift pass.
- Calico thực sự chặn unapproved peer vào API/web, cho phép approved Connect namespace/pod và chặn lại sau khi thu hồi namespace label: pass.
- Qua NGINX thật: HTTPS dùng trusted certificate, HTTP redirect, login, Secure / HttpOnly / SameSite cookie, cross-origin rejection và worker rolling restart: pass. Probe đọc đầy đủ response body từ Linux test client, giữ CA/hostname verification; certificate fixture pass strict X.509 handshake regression.
- Harness chỉ xóa các namespace và external PostgreSQL do run tạo: cleanup
pass. Artifact
artifacts/kubernetes-acceptance.json; default kubeconfig của người dùng không thay đổi. Reusable hardening workflow có Kubernetes job bắt buộc, dùng tool/manifests pin version và checksum.
Kết quả SEC-03 live acceptance¶
- Broker Kafka 4.1.2 cô lập dùng short-lived CA/server/client certificates và random SASL credential. Hai Kafka client aiokafka/librdkafka qua SSL, mTLS, SASL_SSL và development-only SASL_PLAINTEXT với PLAIN, SCRAM-SHA-256, SCRAM-SHA-512: 22 kiểm tra pass, gồm sai password, untrusted CA và thiếu mTLS client certificate đều bị từ chối.
- Source PostgreSQL/MySQL và sink PostgreSQL/MySQL: 4/4 path đối soát snapshot, transaction, CRUD, key update, Unicode, NULL, decimal và timestamp qua authenticated Kafka và worker/internal/source/history/sink clients: pass.
- Live tests phát hiện mẫu worker thiếu prefix
CONNECT_*và conflict giữa worker file store với connector inline PEM. Worker reference/harness đã sửa sang built-in FileConfigProvider, giữ certificate validation. Không dùng null override vì Kafka Connect validation từ chối giá trị đó. - API serialization và runtime logs không có plaintext credential/private key; generated certificates/config chỉ nằm trong fixture tạm và đã được cleanup.
- Focused Kafka tests: 15 pass; full API với PostgreSQL: 240 pass, 0 skip.
Artifact live:
artifacts/kafka-security.json,artifacts/cdc-secure-integrity.json.
Kết quả TEST-01¶
- Combined harness tạo UUID-scoped Compose project với cổng loopback trống, kiểm tra ownership trước startup và cleanup chỉ resources/volumes của run.
- Chuỗi integration startup, integrity, recovery, schema/snapshot, retention, failure injection, MinIO, secret boundaries, populated backup/restore/upgrade, production runtime và TLS/SASL source/sink: toàn bộ PASS; cleanup PASS.
- Các fixture database, TLS files và test volume của gate đã xóa; project
cluecdc-hardening-livevà persistent volumes gốc vẫn được giữ riêng. Hardening acceptancelà reusable/manual workflow; Release bắt buộc chờ job này trước publish container hoặc tạo release. Local preparation có chế độ skip-live được ghi rõ incomplete; release workflow không có skip gate.- API security/RBAC/unit regression cuối: 250 pass với dedicated PostgreSQL, 0 skip; gồm strict TLS handshake và deterministic fixture regressions. Web unit: 48 pass; Playwright trong isolated stack: 9/9 pass.
- Thêm 4 regression tests cho gate: thiếu Docker/daemon trả exit 2 và
INFRASTRUCTURE_UNAVAILABLE; startup failure trả exit 1/FAIL và chỉ cleanup project đã sở hữu; pre-existing resources không bị xóa; diagnostics redact credential. Commit2fc3c23; focused 4/4 và full API 250/250 pass. - Gitleaks v8.30.1 scan Git history: không phát hiện leak. Ruff check/format toàn bộ 145 Python files và mypy 74 application files: pass.
- Release preparation (skip-live/skip-docker có báo rõ): pass; format/lint, typecheck, web build, mypy, docs strict, production dependency npm audit và Python pip-audit: pass. Full npm critical gate pass; 5 high transitive dev findings của braces/micromatch/ESLint vẫn nằm trong ngoại lệ upstream đã ghi.
- Actionlint và production kubeconform: pass, 11/11 tài nguyên valid.
- Package metadata và release-notes draft đã chuẩn bị cho
0.2.1; chưa tag, push, merge, publish image hay tạo release. Local Kubernetes rollout/network evidence đã pass; operator vẫn phải xác nhận target environment trước pilot. - Fresh Windows checkout phát hiện MySQL init shell scripts bị Git chuyển
CRLF, gây
/bin/bash^Mvà exit 126. Đã pin*.shvề LF qua.gitattributes; đây là fixture checkout failure, không được đánh dấu thành CDC pass. - Một fresh run phát hiện fault-injection fixture phụ thuộc thứ tự bảng trong
API: đôi lúc chọn ledger nhưng INSERT định dạng accounts. Đã chọn account
table và destination mapping bằng exact identity/topic, dùng explicit column
list; 4 permutation regression tests pass. Combined browser gate sau sửa lỗi
đã PASS 14/14 giai đoạn và cleanup PASS. Báo cáo đó ghi SHA lúc bắt đầu
c42380e; fixture commits được cập nhật trong lúc chạy, nên không dùng làm bằng chứng checkout bất biến. - Lượt xác nhận cuối giữ nguyên clean commit
4295c0ctừ đầu đến cuối: combined browser/live gate 14/14 PASS, exit 0 và cleanup PASS; Playwright 9/9, Kafka client checks 22/22 và secure source/sink matrix 4/4. Commit2fc3c23sau đó chỉ bổ sung gate regression tests, không đổi runtime code. - Báo cáo cuối được giữ trong
artifacts/final-acceptance-20261015/, gồmhardening-gate.json, các JSON acceptance theo nhóm và Kubernetes evidence. Không copy database archives, TLS private keys hoặc dotenv vào bộ bằng chứng. Project/volume của lượt test đã cleanup; 7 persistent volumes gốc củacluecdc-hardening-liveđược giữ nguyên.
Báo cáo nghiệm thu cuối¶
Bảng dưới tổng hợp các kiểm tra đã thực thi. PASS chỉ áp dụng cho supported configuration và hạ tầng test được mô tả, không khẳng định general production readiness. Tất cả 16 task đạt acceptance cục bộ; promotion gates bên dưới chưa được thực hiện từ remote hoặc trên môi trường pilot đích.
| Task ID | Status | Tests | Acceptance criteria | Notes |
|---|---|---|---|---|
| SEC-01 | PASS | Production configuration validators; full API regression | Unsafe production settings fail closed | Development workflow được giữ riêng |
| SEC-02 | PASS | API cookie/CSRF/header tests; real HTTPS ingress/login | TLS, Secure session cookie, origin boundary | CA và hostname verification bật |
| SEC-03 | PASS | 22 TLS/mTLS/SASL client checks; secure JDBC 4/4 | Supported Kafka authentication/encryption; invalid credentials rejected | Broker ACLs và worker identities do operator cấp |
| SEC-04 | PASS | Secret lifecycle/rotation/redaction tests; live API/log boundaries | Không lộ plaintext credentials qua control plane | Key backup/rotation và external Secret sync là vận hành |
| SEC-05 | PASS | RBAC/session/throttle tests; logout regression; full API | Viewer/Ops/Admin enforcement và session revocation | Logout chỉ revoke session hiện tại |
| CDC-01 | PASS | JDBC 4/4; MinIO keyed c/u/d JSONL | Snapshot/streamed state và portable values được đối soát | At-least-once; không tuyên bố global exactly-once |
| CDC-02 | PASS | Connector/task/Connect/API/worker/Kafka/source restarts | Identity/config/offset continuity; không implicit resnapshot | Mất retained history cần explicit recovery |
| CDC-03 | PASS | Add/remove/resnapshot/restart/cancel; schema/type tests | Snapshot isolation, compatibility detection, unsafe change rejection | Breaking schema và engine-specific types cần quyết định |
| CDC-04 | PASS | Live WAL/slot và binlog retention; restricted permissions | Detect retained-history risk và alert lifecycle | Probe không tự xóa slot hay reset position |
| REL-01 | PASS | Live dependency fault injection và catch-up | Failure isolation, visible errors, preserved desired state | Connector recovery không âm thầm recreate/reset |
| REL-02 | PASS | Retry classification/backoff/terminal/manual retry tests | Bounded retries, attempt history, actionable permanent errors | Unknown failures không bị che giấu |
| REL-03 | PASS | PostgreSQL competing-owner races; lifecycle tests | Deterministic adoption, operation leases, duplicate suppression | Connector config mismatch bị chặn |
| OPS-01 | PASS | Populated backup/restore/decrypt; wrong-key/nonempty-target rejection | Verified archive và guarded restore vào database rỗng | Giữ encryption key ngoài backup |
| OPS-02 | PASS | Populated 0003 → 0006; identity/ciphertext/count checks; rerun | Safe v0.2.0 upgrade và idempotency | Không sửa released migrations hay auto downgrade |
| OPS-03 | PASS | Kubeconform 11/11; Docker SIGTERM; live kind/Calico/NGINX | External dependencies, secure Secrets, probes, private networking | Target sizing/HA/identities vẫn cần review |
| TEST-01 | PASS | API 269; web 48; browser 9; immutable prebuilt gate 14/14; workflow lint | Existing/new suites pass và isolated mandatory release gates | Remote exact-release-commit CI vẫn bắt buộc |
Giới hạn và điều kiện triển khai pilot¶
- Trạng thái phê duyệt release: NOT READY for pilot production cho đến khi remote CI trên exact release commit và target-environment/operator review được chấp thuận. Local task acceptance không thay thế các promotion gates đó.
- Không còn API compatibility break được phát hiện. Production configuration nghiêm ngặt hơn; Kustomize base không còn bundled PostgreSQL/Connect, nên cần operator cập nhật external endpoints, Secrets, private callback và selectors.
- Payload CDC tiếp tục đi source → Debezium → Kafka → sink → destination, không đi qua ClueCDC API. Portable types được kiểm chứng; JDBC upsert có replay-idempotent materialized state, object storage có thể chứa duplicate.
- Production npm audit và Python pip-audit không phát hiện vulnerability; full npm critical gate pass nhưng còn 5 high transitive development findings trong chuỗi braces/micromatch/ESLint theo ngoại lệ upstream đã ghi tài liệu. Không áp dụng forced dependency upgrade gây breaking change trong scope này.
- Kubernetes acceptance dùng external PostgreSQL và real CNI/Ingress trong cluster test riêng. Nó không chứng minh availability, capacity, ACLs hoặc certificate/secret lifecycle của một target cluster bất kỳ.
- Remote GitHub Actions chưa PASS trên release commit cuối. Trước promotion, maintainer phải chạy các workflow bắt buộc trên exact release commit, duyệt các ngoại lệ bảo mật và xác nhận target-environment runbook. Không tự động push, merge, tag, publish container hoặc tạo release.
Sửa remote CI: ingress admission Job TTL race¶
- Log run
38682914169-1sau merge ghi nhận Kubernetes bootstrap FAIL: admission-create Complete nhưng admission-patch đã NotFound. Harness ứng dụng chưa được chạy, nên không diễn giải đây là product acceptance PASS hay FAIL. - Pinned ingress-nginx v1.13.3 manifest có
ttlSecondsAfterFinished: 0trên cả hai Job. Đã tái hiện đúng create-wait exit 0 / patch-wait exit 1 trên kind v0.29.0, Kubernetes v1.33.1 và Calico v3.30.3 cô lập. prepare_ingress_fixture.pychỉ bỏ immediate TTL của hai admission Job trong namespace test sau bước SHA-256 verification. Giữ nguyên downloaded source, mandatory completion waits, timeout và webhook enforcement; Job được giữ đến khi caller xóa cluster. Missing/duplicate/wrong-namespace inventory fail closed.- Sau sửa: cả hai Job Complete 1/1, sequential và repeated wait PASS, controller
rollout PASS; Ingress server-side dry-run đi qua webhook PASS với CA bundle
không rỗng và
failurePolicy: Failkhông đổi. - 4 regression tests mới và 12 focused gate/deployment tests PASS; Ruff check, format (147 Python files), Actionlint và MkDocs strict PASS. Đây là targeted bootstrap verification; không chạy lại full CDC/browser gate hay remote CI.
- Cluster test dùng kubeconfig riêng và được cleanup; remote workflow vẫn cần chạy lại trên exact fixed commit trước pilot promotion. Không push/tag/publish.
Review live-hardening run 38687120573¶
- Log người dùng cung cấp: CDC/recovery/schema/retention/failure/MinIO, secret boundaries, metadata recovery, production runtime và Playwright 9/9 đều PASS. SEC-03 timeout khi đợi secure broker, trước client matrix.
- Startup từ 05:33:53 đến 05:38:01 UTC: khoảng 248 giây; MinIO cold Go build riêng 114 giây. Secure broker timeout khoảng 122 giây; diagnostics Kafka riêng chưa có trong upload allowlist của workflow cũ.
- Đã tái hiện Linux filesystem boundary: runner UID 1001 tạo directory 0700, Kafka image UID 1000 không đọc được. Windows bind-mount pass trước đó không kiểm chứng POSIX access này. Secret fixture chuyển sang Docker-owned volume, directory 0750/files 0640, chỉ container có supplemental group 65532 đọc được; Kafka và Connect vẫn chạy non-root, mount read-only, UID ngoài group bị từ chối.
- Broker/Connect đã dừng sẽ fail-fast với exit/OOM state thay vì tiếp tục retry tới timeout. Report ghi phase/cleanup/duration cả khi FAIL; diagnostics redact raw/escaped/line-prefixed private material. Cleanup vẫn thử mọi resource khi log capture hoặc một remove command timeout.
- Linux permission reproduction và 9 focused security/TLS tests ban đầu PASS. Permission check riêng không đủ để kết luận source/sink matrix; kết quả immutable full browser/live verification sau sửa được ghi bên dưới.
- Tối ưu CI: Bake build/load 5 local images với cache scope riêng, API/worker dùng chung API image; runner nhận prebuilt prefix và không build lại. Cache miss vẫn build bình thường; không push image. Report cập nhật từng stage với duration, timeout ghi FAIL thay vì để RUNNING, diagnostics timeout không bỏ qua cleanup; workflow upload thêm Kafka diagnostics đã sanitize.
- 20 focused tests PASS, gồm private volume staging, fail-fast, redaction, cleanup timeouts, missing-image rejection và cache-tag/runner contract. Ruff/format PASS; local Bake build/load 5 images PASS. Cache backend GitHub không được benchmark từ máy local; cần đo warm-run CI sau khi cập nhật remote.
- Full API regression: 269 PASS / 0 skip với PostgreSQL test riêng; web unit: 48/48 PASS. Production npm audit: 0 vulnerabilities; Python pip-audit: không phát hiện vulnerability đã biết. Git history scan không phát hiện leak.
- Repository safety đã bắt PEM marker giả trong test mới. Commit
2b50dfcchuyển test sang tạo private key tạm tại runtime; safety check và 9 focused security/TLS tests PASS, không thay đổi scanner rules hay runtime behavior. - Full browser/live gate giữ immutable checkout
c75e0f1, prebuilt mode; local startup 50,2 giây (không tính build). Không so trực tiếp với 248 giây cold build/startup từ runner CI khác; warm-cache CI vẫn cần đo từ remote. - Kết quả cuối: 14/14 stages PASS, Playwright 9/9, Kafka security 22/22 và authenticated JDBC matrix 4/4 PASS; exit 0, secure-fixture cleanup PASS và overall Compose cleanup PASS. Secure stage hoàn tất trong 168,6 giây gồm cả client negative cases, Connect startup và CDC reconciliation, không còn broker-readiness timeout. Không dùng duration này để so với timeout 122 giây của lượt FAIL chưa hề chạy source/sink matrix.
- Quan sát trực tiếp live fixture: broker UID 1000, Connect UID 1001, cả hai
supplemental GID 65532; directory 0750 và key/config 0640, owner root:65532.
Volume và secure containers đã được xóa, 6 container stack
cluecdcđang chạy của người dùng không bị restart, stop hoặc thay đổi cấu hình. - Báo cáo JSON được giữ tại
artifacts/live-hardening-fix-20261015/; không copy dotenv, private keys, raw fixture config hay database dump. Commit sauc75e0f1chỉ đổi test key generation và tài liệu, không đổi runtime/harness. Remote workflow vẫn cần rerun trên exact final commit; chưa push/tag/publish. - Audit tag cuối lượt: local annotated tag
v0.2.1hiện trỏ7e78fa1(tagger date 2026-10-15T12:29:59+07:00), không chứa các commit fix mới. Rerun workflow trên tag cũ vẫn checkout fixture cũ. Maintainer cần kiểm chứng nhánh/commit fix và quyết định release candidate/version theo immutable-tag policy; phiên sửa này không tạo, retarget hay push tag hiện có.
2026-10-15 — Refactor quy trình release: candidate trước, tag sau¶
- Nhánh
refactor/release-candidate-workflowkế thừa toàn bộ fix live-hardening; commit9b235c7thêm quy trình release, không sửa application runtime hay giảm acceptance criteria SEC-01–TEST-01. npm run release:plankiểm tra package/changelog/notes/deployment image pins, in exact SHA, dirty state và cảnh báo local tag trùng. Chỉ đọc, không fetch, bump version, tạo/move tag hoặc publish.--require-new-tagtrả exit 1 nếu tag đã tồn tại; metadata chưa final vẫn được phép kiểm thử candidate.release-check.pydùng được trên mọi preparation branch, có quality-only profile cho local/CI, bắt buộc PostgreSQL test URL để tránh skip coverage, và chuyển tiếp browser/disposable env options. Skip/dirty flags chỉ dành cho preparation; output luôn phân biệt local checks với release approval.- Workflow Release candidate dùng read-only repository permissions, không
có publishing jobs. Candidate và tag publisher dùng chung
release-validation.ymlvàhardening.yml; vẫn giữ browser/CDC và Kubernetes gates. Source archive, metadata SHA/version và checksums được lưu cùng run. - Publisher yêu cầu notes/date final, default-branch ancestry, kiểm tra GitHub
Release và exact GHCR image tags bằng GET/HEAD. Chỉ HTTP 404 được coi là chưa
tồn tại; lỗi auth/network chặn publish. Mỗi matrix attempt kiểm tra lại riêng
image của nó để ngăn failed-job rerun ghi đè partial publication. Không còn
gh release edithoặc asset--clobber; download được kiểm tra checksum/SHA. Prerelease không cập nhật stable aliases. Preflight không thay thế registry locking hoặc chính sách giới hạn các publisher bên ngoài workflow. - Đã cập nhật README, RELEASES, checklist, development guide và CHANGELOG
[Unreleased]; không tự chọn version thay thếv0.2.1đã tồn tại. - Kiểm chứng local trên code
9b235c7(documentation edits còn dirty, đã dùng--preparation --quality-only --allow-dirty): 327 API tests, 0 skipped, 34.38s, gồm 58 release-tooling tests; 48 web tests PASS. Production build, 3 Compose config variants, deployment validation (11 resources), Ruff check/format (152 files), mypy (74 modules), MkDocs strict và Actionlint PASS. Gitleaks scan 45 commits không phát hiện leak. npm production audit 0 và pip-audit không có known vulnerability; full-tree critical gate PASS nhưng vẫn có 5 high development-only findings trong exception đã ghi nhận. - Negative checks thực tế:
--require-finaltừ chối draft/date hiện tại bằng exit 1;release:plan --require-new-tagtừ chối reusev0.2.1, tag vẫn trỏ7e78fa1. Không sửa tag,.env, hoặc 6 container stack của người dùng. - Chưa chạy workflow candidate mới trên GitHub, chưa kiểm chứng GHCR auth với workflow token, chưa rerun live/browser/Kubernetes trên commit refactor này. Bằng chứng live trước đó giữ nguyên SHA đã ghi, không được coi là pass cho final candidate mới. Cần đưa workflow lên default branch qua review, chọn unused version, finalize metadata, chạy candidate trên exact final SHA và hoàn tất operator review trước khi maintainer tạo tag. Không push/merge/tag/ publish trong lượt này.
2026-10-15 — Chuẩn bị metadata release v0.2.1¶
- Theo yêu cầu giữ version
0.2.1, nhánhrelease/v0.2.1-metadatabắt đầu từ default branchacffd48. API package và toàn bộ deployment image pins đã là0.2.1, không cần bump version hoặc thay đổi runtime/workflow. - Chốt changelog
## [0.2.1] - 2026-10-15; chuyển các thay đổi release tooling đã có trong candidate từ[Unreleased]vào mục0.2.1. Ghi nhận thêm các fix Linux fixture permissions, ingress Job TTL và cached/incremental hardening. - Bỏ
Unreleased draft.trong release notes và(Draft)trong MkDocs nav. Cập nhật số quality tests theo bằng chứng đã ghi: 327 API (gồm 58 release tooling), 48 web. Tách rõ live/browser/Kubernetes là các lượt và SHA khác; finalized metadata không phải bằng chứng publish hay production approval. - Kiểm tra lần này:
check-release-version.py --tag v0.2.1 --require-finalPASS, 58 release-tooling regression tests PASS, MkDocs strict PASS. Không rerun application/live/browser/Kubernetes acceptance cho docs-only diff. - Local annotated tag
v0.2.1tại đầu lượt đã trỏacffd48(tag objectd2c1313), khác trạng thái được ghi trong các lượt trước. Giữ nguyên tag: commit metadata mới không tự xuất hiện trong checkout của tag hiện có, nên rerun workflow trên tag cũ vẫn gặp draft guard. Đây là blocker promotion cần maintainer xử lý theo tag/release policy; không tự xóa, tạo lại hoặc retarget tag. Remote registry/release availability và exact final-SHA CI chưa được kiểm chứng trong lượt này. Không push, merge, tag hoặc publish.