@rt-tools/agent-kit 0.24.0 → 0.27.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/assets/agents/business-analyst.md +51 -50
- package/assets/agents/cargo-writer.md +54 -0
- package/assets/agents/conscience.md +37 -35
- package/assets/agents/project-manager.md +49 -48
- package/assets/agents/prose-editor.md +31 -29
- package/assets/agents/qa-engineer.md +50 -48
- package/assets/agents/rules-reviewer.md +63 -58
- package/assets/agents/skill-curator.md +83 -78
- package/assets/agents/spec-critic.md +34 -29
- package/assets/agents/spec-writer.md +35 -32
- package/assets/agents/strict-teacher.md +39 -37
- package/assets/checks/archive-age.mjs +48 -28
- package/assets/checks/archive-prune.mjs +16 -14
- package/assets/checks/board-epic-link.github.mjs +29 -0
- package/assets/checks/board-epics.github.mjs +286 -49
- package/assets/checks/board-folders.mjs +61 -0
- package/assets/checks/board-gh.github.mjs +35 -26
- package/assets/checks/board-long-work.github.mjs +29 -25
- package/assets/checks/board-paths.github.mjs +21 -16
- package/assets/checks/board-pull-state.github.mjs +168 -0
- package/assets/checks/board-runs.github.mjs +45 -43
- package/assets/checks/board-task-dirs.github.mjs +98 -0
- package/assets/checks/board-titles.github.mjs +19 -17
- package/assets/checks/board.github.mjs +133 -194
- package/assets/checks/check-archive-age.mjs +23 -19
- package/assets/checks/check-board.github.mjs +131 -263
- package/assets/checks/check-descriptions.mjs +30 -29
- package/assets/checks/check-doc-paths.mjs +91 -88
- package/assets/checks/check-dupes.mjs +84 -80
- package/assets/checks/check-file-size.mjs +74 -71
- package/assets/checks/check-glossary.mjs +47 -37
- package/assets/checks/check-hook-scope.mjs +30 -27
- package/assets/checks/check-lib-layers.mjs +22 -21
- package/assets/checks/check-profile-drift.mjs +48 -43
- package/assets/checks/check-prose-style.mjs +138 -39
- package/assets/checks/check-push-gate.mjs +53 -50
- package/assets/checks/check-reuse.mjs +50 -40
- package/assets/checks/check-schema-drift.mjs +104 -84
- package/assets/checks/check-specs.mjs +155 -134
- package/assets/checks/check-state-next.mjs +66 -52
- package/assets/checks/check-states.mjs +32 -30
- package/assets/checks/check-styles.mjs +52 -51
- package/assets/checks/check-turn-map.mjs +54 -46
- package/assets/checks/epic-table.github.mjs +268 -0
- package/assets/checks/lib-boundaries.mjs +32 -30
- package/assets/checks/lib-common.mjs +30 -29
- package/assets/checks/lib-domains.mjs +34 -34
- package/assets/checks/lib-manifests.mjs +17 -15
- package/assets/checks/lib-reexports.mjs +18 -18
- package/assets/checks/rt-kit-checks.config.mjs +187 -142
- package/assets/checks/signals.mjs +43 -39
- package/assets/checks/spec-anchors.mjs +114 -87
- package/assets/checks/spec-common.mjs +128 -84
- package/assets/checks/spec-contract.mjs +30 -30
- package/assets/checks/spec-proposed.mjs +27 -24
- package/assets/checks/spec-scenarios.mjs +51 -28
- package/assets/checks/specs-for.mjs +214 -0
- package/assets/checks/task-new.github.mjs +315 -61
- package/assets/commands/feedback.md +65 -59
- package/assets/commands/next-session.md +64 -57
- package/assets/commands/night.md +115 -0
- package/assets/commands/skill-curator.md +83 -79
- package/assets/defaults/gate-map.sh +108 -97
- package/assets/defaults/project.sh +232 -185
- package/assets/defaults/shell.sh +73 -68
- package/assets/defaults/turn-map.md +47 -44
- package/assets/docs/GLOSSARY.md +142 -65
- package/assets/hooks/browser-device-id.sh +16 -12
- package/assets/hooks/browser-guard-device-id.sh +34 -28
- package/assets/hooks/browser-guard-no-asking.sh +5 -4
- package/assets/hooks/browser-guard-no-listing.sh +12 -11
- package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
- package/assets/hooks/browser-guard-require-select.sh +34 -23
- package/assets/hooks/claim-guard.sh +62 -56
- package/assets/hooks/commit-msg.sh +14 -10
- package/assets/hooks/conscience-guard.sh +91 -45
- package/assets/hooks/constitution-index.sh +16 -16
- package/assets/hooks/deny-tail.sh +28 -26
- package/assets/hooks/dev-server-guard.sh +50 -43
- package/assets/hooks/dispatch.sh +60 -46
- package/assets/hooks/docs-guard.sh +100 -91
- package/assets/hooks/epic-over.sh +49 -0
- package/assets/hooks/epic-stop-guard.sh +108 -0
- package/assets/hooks/exam-guard.sh +105 -93
- package/assets/hooks/git-guard-delivery-conflict.sh +41 -36
- package/assets/hooks/git-guard-delivery-draft.sh +48 -38
- package/assets/hooks/git-guard-delivery-epic.sh +167 -0
- package/assets/hooks/git-guard-delivery-folder.sh +50 -43
- package/assets/hooks/git-guard-delivery-signature.sh +119 -53
- package/assets/hooks/git-guard-delivery.sh +223 -183
- package/assets/hooks/git-guard-main.sh +38 -34
- package/assets/hooks/git-guard-push-tests.sh +99 -87
- package/assets/hooks/glossary-load.sh +23 -22
- package/assets/hooks/grill-gate-ask.sh +12 -11
- package/assets/hooks/grill-gate.sh +94 -87
- package/assets/hooks/guard-note.sh +20 -19
- package/assets/hooks/handoff-entry-guard.sh +45 -25
- package/assets/hooks/handoff-write.sh +74 -67
- package/assets/hooks/hook-input.sh +67 -58
- package/assets/hooks/lint-after-edit.sh +95 -61
- package/assets/hooks/observe.sh +28 -26
- package/assets/hooks/override-write-guard.sh +23 -21
- package/assets/hooks/postmortem-guard.sh +42 -39
- package/assets/hooks/profile-check.sh +22 -20
- package/assets/hooks/proposal-guard.sh +57 -49
- package/assets/hooks/prose-style-guard.sh +49 -24
- package/assets/hooks/qa-dataid-guard.sh +83 -58
- package/assets/hooks/rerun-guard.sh +31 -30
- package/assets/hooks/reuse-first-guard.sh +108 -87
- package/assets/hooks/roles.sh +14 -14
- package/assets/hooks/rule-article.sh +39 -34
- package/assets/hooks/rule-source-guard.sh +47 -42
- package/assets/hooks/skill-gate-layers.sh +63 -57
- package/assets/hooks/skill-gate-rearm.sh +15 -8
- package/assets/hooks/skill-gate.sh +89 -81
- package/assets/hooks/skill-loaded.sh +10 -6
- package/assets/hooks/sql-guard-parse.sh +71 -66
- package/assets/hooks/sql-guard-request.sh +51 -46
- package/assets/hooks/sql-guard-target.sh +60 -51
- package/assets/hooks/sql-guard-write.sh +87 -79
- package/assets/hooks/sql-guard.sh +52 -47
- package/assets/hooks/stand-login-guard.sh +43 -37
- package/assets/hooks/task-context-load.sh +60 -55
- package/assets/hooks/task-flow-context.sh +87 -69
- package/assets/hooks/task-flow-draft-guard.sh +55 -48
- package/assets/hooks/task-flow-guard.sh +67 -64
- package/assets/hooks/turn-entry-load.sh +39 -32
- package/assets/hooks/turn-exit-guard.sh +260 -204
- package/assets/hooks/turn-exit-patterns.sh +63 -0
- package/assets/hooks/utf8.sh +14 -11
- package/assets/hooks/waiting-turn-guard.sh +104 -94
- package/assets/hooks/window-fill-guard.sh +70 -62
- package/assets/hooks/work-start-guard.sh +52 -49
- package/assets/hooks/write-targets.sh +99 -44
- package/assets/laws/autonomous-work.md +29 -27
- package/assets/laws/code-structure.md +31 -30
- package/assets/laws/delivery.md +170 -137
- package/assets/laws/entity-editing.md +52 -50
- package/assets/laws/entity-models.md +14 -13
- package/assets/laws/frontend-application.md +39 -38
- package/assets/laws/lib-imports.md +27 -27
- package/assets/laws/lists.md +31 -29
- package/assets/laws/navigation.md +37 -37
- package/assets/laws/observability.md +41 -40
- package/assets/laws/project-documentation.md +106 -99
- package/assets/laws/reuse-first.md +31 -29
- package/assets/laws/shared-code.md +27 -27
- package/assets/laws/verifiability.md +131 -124
- package/assets/laws/work-conduct.md +250 -244
- package/assets/patterns/admin-lists-screen.md +72 -69
- package/assets/patterns/admin-nav-item.md +51 -46
- package/assets/patterns/angular-patterns-state.md +32 -31
- package/assets/patterns/api-layer-pair.md +33 -31
- package/assets/patterns/autonomous-work-run.md +50 -49
- package/assets/patterns/browser-verification-measure.md +124 -88
- package/assets/patterns/browser-verification-stand.md +169 -157
- package/assets/patterns/component-structure-new.md +51 -42
- package/assets/patterns/dependencies-upgrade.md +55 -39
- package/assets/patterns/doc-style-human.md +55 -37
- package/assets/patterns/doc-style-sweep.md +82 -79
- package/assets/patterns/doc-style-trace.md +87 -81
- package/assets/patterns/doc-style-write.md +130 -122
- package/assets/patterns/entity-aside.md +77 -63
- package/assets/patterns/entity-models-new.md +37 -37
- package/assets/patterns/entity-store.md +33 -33
- package/assets/patterns/git-workflow-commit.azure.md +94 -87
- package/assets/patterns/git-workflow-commit.github.md +160 -142
- package/assets/patterns/git-workflow-commit.gitlab.md +96 -90
- package/assets/patterns/git-workflow-docker.md +165 -147
- package/assets/patterns/git-workflow-freshness.md +45 -45
- package/assets/patterns/git-workflow-merge.md +102 -94
- package/assets/patterns/git-workflow-migration.md +54 -52
- package/assets/patterns/git-workflow-pr-ready.md +57 -56
- package/assets/patterns/git-workflow-pr.azure.md +127 -122
- package/assets/patterns/git-workflow-pr.github.md +186 -177
- package/assets/patterns/git-workflow-pr.gitlab.md +139 -132
- package/assets/patterns/git-workflow-restart.md +35 -31
- package/assets/patterns/git-workflow-secrets.md +80 -73
- package/assets/patterns/git-workflow-stack.md +136 -107
- package/assets/patterns/lib-layers-move.md +62 -53
- package/assets/patterns/lib-layers-new.md +59 -45
- package/assets/patterns/observability-record.md +72 -67
- package/assets/patterns/platform-access-di.md +31 -29
- package/assets/patterns/reuse-first-extend.md +66 -61
- package/assets/patterns/shared-code-new.md +39 -38
- package/assets/patterns/spec-driven-domain.md +161 -151
- package/assets/patterns/spec-driven-rule.md +179 -168
- package/assets/patterns/spec-driven-sweep.md +41 -39
- package/assets/patterns/status-report-table.github.md +48 -36
- package/assets/patterns/styling-bem-component.md +42 -42
- package/assets/patterns/styling-bem-layout.md +39 -34
- package/assets/patterns/styling-bem-sheet.md +59 -58
- package/assets/patterns/task-flow-archive.md +222 -215
- package/assets/patterns/task-flow-close.md +234 -203
- package/assets/patterns/task-flow-handoff.md +154 -145
- package/assets/patterns/task-flow-resume.md +138 -133
- package/assets/patterns/task-flow-start.md +228 -202
- package/assets/patterns/testing-e2e.md +102 -101
- package/assets/patterns/testing-unit.md +77 -70
- package/assets/patterns/ts-procedure.md +32 -29
- package/assets/patterns/turn-entry-map.md +50 -48
- package/assets/pitfalls/agent-kit.md +172 -142
- package/assets/pitfalls/doc-style.md +96 -91
- package/assets/pitfalls/git-workflow.azure.md +49 -46
- package/assets/pitfalls/git-workflow.github.md +270 -234
- package/assets/pitfalls/git-workflow.gitlab.md +49 -45
- package/assets/pitfalls/spec-driven.md +73 -71
- package/assets/pitfalls/styling-bem.md +46 -40
- package/assets/pitfalls/task-flow.md +262 -246
- package/assets/pitfalls/testing.md +99 -92
- package/assets/pitfalls/turn-conduct.md +96 -81
- package/assets/rules/angular-patterns.md +81 -80
- package/assets/rules/api-layer.md +77 -74
- package/assets/rules/autonomous-work.md +87 -74
- package/assets/rules/browser-verification.md +223 -214
- package/assets/rules/component-structure.md +72 -69
- package/assets/rules/dependencies.md +74 -67
- package/assets/rules/deploy-flow.azure.md +118 -108
- package/assets/rules/deploy-flow.github.md +145 -135
- package/assets/rules/deploy-flow.gitlab.md +120 -110
- package/assets/rules/doc-style.md +201 -173
- package/assets/rules/entity-conventions.needs-admin.md +81 -79
- package/assets/rules/entity-models.md +73 -70
- package/assets/rules/git-workflow.azure.md +224 -228
- package/assets/rules/git-workflow.github.md +268 -239
- package/assets/rules/git-workflow.gitlab.md +218 -217
- package/assets/rules/lib-layers.md +85 -86
- package/assets/rules/lists.md +101 -97
- package/assets/rules/navigation.md +78 -78
- package/assets/rules/observability.needs-app.md +165 -153
- package/assets/rules/platform-access.md +76 -75
- package/assets/rules/reuse-first.md +153 -143
- package/assets/rules/shared-code.md +82 -79
- package/assets/rules/spec-driven.md +279 -260
- package/assets/rules/status-report.md +62 -58
- package/assets/rules/styling-bem.md +81 -77
- package/assets/rules/task-flow.md +303 -270
- package/assets/rules/testing.md +224 -209
- package/assets/rules/turn-conduct.md +262 -258
- package/assets/rules/turn-entry.md +92 -87
- package/assets/rules/typescript-conventions.md +94 -88
- package/assets/samples/specs/_template/spec.md +47 -47
- package/assets/samples/tasks/_template/grill.md +20 -20
- package/assets/samples/tasks/_template/plan.md +32 -30
- package/assets/samples/tasks/_template/progress.md +16 -16
- package/assets/skills/agent-kit-extend.md +129 -113
- package/assets/skills/agent-kit.md +259 -233
- package/assets/skills/write-a-skill.md +76 -71
- package/assets/templates/findings.md +19 -19
- package/assets/templates/gate-map.sh +16 -14
- package/assets/templates/implementation.md +28 -27
- package/assets/templates/pattern.md +17 -17
- package/assets/templates/pitfalls.md +6 -6
- package/assets/templates/postmortem.md +24 -23
- package/assets/templates/project.sh +24 -24
- package/assets/templates/proposal.md +62 -60
- package/assets/templates/rule.md +38 -38
- package/assets/workflows/feature.js +46 -46
- package/assets/workflows/plan.js +54 -54
- package/bin/agent-kit.d.ts.map +1 -1
- package/bin/agent-kit.js +8 -1
- package/bin/agent-kit.js.map +1 -1
- package/lib/cargo-prose.d.ts +41 -0
- package/lib/cargo-prose.d.ts.map +1 -0
- package/lib/cargo-prose.js +88 -0
- package/lib/cargo-prose.js.map +1 -0
- package/lib/cargo.d.ts +12 -1
- package/lib/cargo.d.ts.map +1 -1
- package/lib/cargo.js +8 -2
- package/lib/cargo.js.map +1 -1
- package/lib/catalog.d.ts +2 -0
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +4 -3
- package/lib/catalog.js.map +1 -1
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +5 -2
- package/lib/commands.js.map +1 -1
- package/lib/companion.js +3 -2
- package/lib/companion.js.map +1 -1
- package/lib/enroll.d.ts +7 -1
- package/lib/enroll.d.ts.map +1 -1
- package/lib/enroll.js +12 -3
- package/lib/enroll.js.map +1 -1
- package/lib/fate.d.ts +29 -0
- package/lib/fate.d.ts.map +1 -0
- package/lib/fate.js +147 -0
- package/lib/fate.js.map +1 -0
- package/lib/override-marks.d.ts +7 -0
- package/lib/override-marks.d.ts.map +1 -1
- package/lib/override-marks.js +14 -0
- package/lib/override-marks.js.map +1 -1
- package/lib/plan.d.ts +11 -0
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +10 -1
- package/lib/plan.js.map +1 -1
- package/lib/ship.d.ts +29 -9
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +44 -2
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.fixture.d.ts +8 -1
- package/lib/shipment.fixture.d.ts.map +1 -1
- package/lib/shipment.fixture.js +9 -0
- package/lib/shipment.fixture.js.map +1 -1
- package/lib/shipment.js +38 -5
- package/lib/shipment.js.map +1 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +45 -11
- package/lib/sync.js.map +1 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.27.0.tgz +0 -0
- package/rt-tools-agent-kit-0.24.0.tgz +0 -0
|
@@ -2,106 +2,113 @@
|
|
|
2
2
|
name: git-workflow-secrets
|
|
3
3
|
kind: pattern
|
|
4
4
|
rule: deploy-flow
|
|
5
|
-
description:
|
|
5
|
+
description: Pattern of rule deploy-flow. Load when working with keys of external services — where they live, how the owner's key differs from the environment key, what each state of an integration row means and why a green probe does not promise a working feature.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Keys of external services
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Pattern of the rule `deploy-flow`. What must be true meanwhile — the law
|
|
11
11
|
`docs/constitution/delivery.md`.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## When to use
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
15
|
+
- A feature that goes outside is silent: mails do not leave, translations do not update.
|
|
16
|
+
- A key of an external service is being created or changed.
|
|
17
|
+
- It is being analysed what exactly is rolled out and what the application lacks to work —
|
|
18
|
+
including a key that lives in the environment and has no screen.
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## A rollout secret is not a key of an external service
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
The keys of this pattern live in the storage or in the production stack, and the application
|
|
23
|
+
reads them. Rollout secrets — the node access key, the registry password, the intake address and
|
|
24
|
+
token — are not read by the application at all: the pipeline reads them, they lie in the
|
|
25
|
+
repository settings, and the storage knows nothing of them.
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
Hence a different course on a miss. A missing service key is silent on the screen: the feature
|
|
28
|
+
does not work, and the application answers. A missing rollout secret brings down a pipeline step,
|
|
29
|
+
and the application is never reached at all — it is analysed in the step's log, not in the
|
|
30
|
+
browser.
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
How a rollout secret is created and what checks its rights is said by the pattern of working with
|
|
33
|
+
images — `git-workflow-docker`, if the tree has laid it out. Here the border remains: whoever came
|
|
34
|
+
for a rollout secret reads on not in this text.
|
|
33
35
|
|
|
34
|
-
##
|
|
36
|
+
## A key created by the owner lives in the storage, not in the environment
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
Such a key lies as a row in the storage, encrypted with the secrets encryption key; next to it an
|
|
39
|
+
open hint of the last characters and the outcome of the last probe. One service reads it and
|
|
40
|
+
gives it to those who go outside.
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
**There is no fallback path to the environment.** A variable of the same name in the production
|
|
43
|
+
stack means nothing: the application does not read it. One key is taken from the environment —
|
|
44
|
+
the one that encrypts all the others. Losing it makes the recorded keys unreadable, and creating
|
|
45
|
+
them anew is useless until it is back.
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
Such keys the owner creates themselves, on the integrations screen. **The agent does not enter
|
|
48
|
+
keys:** entering an access key into a field is forbidden to it whoever asks.
|
|
47
49
|
|
|
48
|
-
##
|
|
50
|
+
## Not every key of an external service is created by the owner
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
The storage holds keys the owner creates themselves and differently for each property. A key that
|
|
53
|
+
is the same for the whole application stays in the environment, and it has no integrations
|
|
54
|
+
screen.
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
The halves of such a pair — the backend key and the key baked into the build — lie on different
|
|
57
|
+
sides of delivery, and exactly one can be filled. Then the feature is neither off nor on: the
|
|
58
|
+
widget is not drawn, the server waits for a token. The application calls such a state broken and
|
|
59
|
+
says so by a log line and the startup digest — what stands in it is described by the rule
|
|
60
|
+
`observability`.
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
Hence the order of analysis for a key from the environment: it is read not on the integrations
|
|
63
|
+
screen but in the startup digest in the container logs — in which of its lists the feature name
|
|
64
|
+
stands.
|
|
60
65
|
|
|
61
|
-
##
|
|
66
|
+
## An integration row speaks in five states
|
|
62
67
|
|
|
63
|
-
|
|
68
|
+
The order of analysis matters — the storage state overrides everything else:
|
|
64
69
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
70
|
+
| What is shown | What it means |
|
|
71
|
+
| ------------------------------------- | -------------------------------------------------------------------------- |
|
|
72
|
+
| state unknown | the answer has not come yet; nothing to claim |
|
|
73
|
+
| storage unavailable | there is no encryption key; keys cannot be created, and the owner is not at fault |
|
|
74
|
+
| not set | there is no secret row at all — the key was never created |
|
|
75
|
+
| nothing to decrypt with | the row exists, and the encryption key has changed; creating anew is useless |
|
|
76
|
+
| unchecked · working · not working | the key is recorded; from here the probe judges |
|
|
72
77
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
Hence the short path of analysis: a mail or a translation is silent — first open this screen, not
|
|
79
|
+
the logs. "Not set" answers the question whole, and ten days of silent mail turned out to be
|
|
80
|
+
exactly that, not the server.
|
|
76
81
|
|
|
77
|
-
##
|
|
82
|
+
## A green probe promises less than it seems
|
|
78
83
|
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
The probe asks the service for what it gives out by the key: the list of domains, the list of
|
|
85
|
+
models. It sends no mail and makes no paid request — but it does not prove the feature works
|
|
86
|
+
either:
|
|
81
87
|
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
|
|
88
|
+
- the list of models is given out with an empty balance too, while the request itself is refused
|
|
89
|
+
for lack of funds. The row is green meanwhile;
|
|
90
|
+
- the mail probe checks the sender address against the list of confirmed ones — but only if the
|
|
91
|
+
address is already filled. With an empty address it answers "working", and mails will not leave.
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
|
|
93
|
+
So after entering a key the feature itself is checked, not the row: save a record and make sure
|
|
94
|
+
the warning did not come; wait for the first enquiry and see the mail.
|
|
89
95
|
|
|
90
|
-
##
|
|
96
|
+
## Moving a key from the environment into the storage is not done by a migration
|
|
91
97
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
The secret is encrypted by the application, so a query to the storage cannot move it: the
|
|
99
|
+
migration creates the table and does not touch values. A key moved from the environment into the
|
|
100
|
+
settings must be created by the owner on the same day the edit is rolled out — otherwise the
|
|
101
|
+
feature goes silent silently. Checked on the same integrations screen right after the rollout.
|
|
96
102
|
|
|
97
|
-
##
|
|
103
|
+
## Common misses
|
|
98
104
|
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
- **Looking for the key by a search over the production stack and drawing a conclusion.** The
|
|
106
|
+
value lies there, the application does not read it, and the tail of the last characters matches
|
|
107
|
+
the one recorded in the storage — a match of the hint and the variable proves nothing except
|
|
108
|
+
that the owner created the same key.
|
|
109
|
+
- **Going to the logs before the screen.** The logs will tell about the external service's
|
|
110
|
+
refusal, and the screen — "not set"; the second is more precise and costs one click.
|
|
111
|
+
- **Taking the absence of errors as a sign of work.** Neither mail nor translation brings the
|
|
112
|
+
request down: the enquiry is saved, the record is saved, and nothing leaves outside.
|
|
113
|
+
- **Creating the key anew on "nothing to decrypt with".** This is not about the key but about
|
|
114
|
+
the encryption key; a new one will lie next to it and will not be read either.
|
|
@@ -2,145 +2,175 @@
|
|
|
2
2
|
name: git-workflow-stack
|
|
3
3
|
kind: pattern
|
|
4
4
|
rule: git-workflow
|
|
5
|
-
description:
|
|
5
|
+
description: Pattern of rule git-workflow. Load when pieces of work follow one another or more than two branches already stand on one base — chained branching from the previous one, the PR base, merging bottom-up, re-merging main on an actual conflict. One conflict — pattern git-workflow-merge.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# A stack of PRs from one base
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
`docs/constitution/delivery.md`.
|
|
12
|
-
|
|
10
|
+
Pattern of the rule `git-workflow`. What must be true — the law
|
|
11
|
+
`docs/constitution/delivery.md`. Resolving one conflict — pattern `git-workflow-merge`,
|
|
12
|
+
opening one PR — `git-workflow-pr`.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
**The calls here are given with the GitHub client.** A tree on another host reads them as the
|
|
15
|
+
form and takes the command from its own client: field and subcommand names differ between
|
|
16
|
+
clients, and what is asked is one. The match is named by the edition of the delivery rule laid
|
|
17
|
+
out in that tree.
|
|
17
18
|
|
|
18
|
-
##
|
|
19
|
+
## When to use
|
|
19
20
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
21
|
+
- More than two branches are created from one base, and all wait for a merge.
|
|
22
|
+
- Several works were done in one session, and they lie in the tree unpublished.
|
|
23
|
+
- It is decided in which order to hand the accumulated over to the owner.
|
|
23
24
|
|
|
24
|
-
##
|
|
25
|
+
## A chain: branch from the previous one, not from the epic branch
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
A stack from one base is what to avoid. Works that go one after another branch one after
|
|
28
|
+
another:
|
|
27
29
|
|
|
28
30
|
```bash
|
|
29
|
-
#
|
|
30
|
-
git checkout -b <КЛЮЧ>-<номер>-<slug>
|
|
31
|
+
# the first work of the chain — from the epic branch, as usual
|
|
32
|
+
git checkout -b <КЛЮЧ>-<номер>-<slug> <ветка эпика>
|
|
31
33
|
|
|
32
|
-
#
|
|
34
|
+
# each next one — from the previous branch, not from the epic branch
|
|
33
35
|
git checkout -b <КЛЮЧ>-<следующий>-<slug> <КЛЮЧ>-<номер>-<slug>
|
|
34
36
|
```
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
рукой, — а не при слиянии, у владельца, у которого нет ни одной.
|
|
38
|
+
A chain lives inside one epic: every branch of it stands, directly or through its neighbours, on
|
|
39
|
+
the epic branch, and the lowest request of the chain has that branch as its base.
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
The previous edit then lies in the common ancestor, and two different changes of one file never
|
|
42
|
+
have to be reconciled at all. The divergence surfaces at branching — at the one who has both
|
|
43
|
+
edits as their own and at hand — not at the merge, at the owner, who has neither.
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
From the epic branch the first work of the chain and any work that does not touch the previous
|
|
46
|
+
one: a chain is about neighbouring works, not about all in a row.
|
|
47
|
+
|
|
48
|
+
## A chain PR stands on the previous branch
|
|
44
49
|
|
|
45
50
|
```bash
|
|
46
51
|
gh pr create --base <предыдущая ветка> --title '[<КЛЮЧ>-<номер>] <что сделано>' --body-file <файл>
|
|
47
52
|
```
|
|
48
53
|
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
Neither the main branch nor the epic branch is set as the base here: the review then shows the own
|
|
55
|
+
edit mixed with all under it. The host retargets a merged lower one itself — the base of its heir
|
|
56
|
+
becomes the base of the merged one, that is, the epic branch.
|
|
51
57
|
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
The merge order stands in every PR body as the line "stands on #<number>, merge after it": the
|
|
59
|
+
owner merges by the list, and branch kinship is invisible in the list.
|
|
54
60
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
**The tree's pipeline is checked for whether it listens to a PR with such a base.** The host
|
|
62
|
+
sends the PR event with a base filter, and a tree that left only the main branch in the filter
|
|
63
|
+
gives neither the chain nor a single task of an epic any run at all: the PR stands green-and-empty, and there is nothing to
|
|
64
|
+
bring the event back — neither a new commit nor reclosing the PR changes the base. This is asked
|
|
65
|
+
before the chain is created: from the pipeline settings, not from the PR page, where a missing
|
|
66
|
+
run looks the same as waiting for one.
|
|
61
67
|
|
|
62
68
|
```bash
|
|
63
|
-
#
|
|
69
|
+
# the whole chain order — bottom-up
|
|
64
70
|
gh pr list --state open --json number,headRefName,baseRefName \
|
|
65
71
|
--jq '.[] | "\(.number)\t\(.headRefName)\tна \(.baseRefName)"'
|
|
66
72
|
```
|
|
67
73
|
|
|
68
|
-
##
|
|
74
|
+
## What is not done in a chain
|
|
69
75
|
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
- **The lower branch's history is not rewritten.** Neither `rebase` nor a force push: the upper
|
|
77
|
+
one's tip becomes reachable from its base, and the host closes the upper PR as merged — though
|
|
78
|
+
main has none of its edits. A lagging lower one is fixed by merging main into it and onward
|
|
79
|
+
upward.
|
|
80
|
+
- **A chain is not merged from the middle.** One merged out of order drags along everything
|
|
81
|
+
under it — and the review of that work never happens.
|
|
82
|
+
- **Ready branches are not hoarded.** A chain does not cancel that the unit of work is a merged
|
|
83
|
+
PR: it only makes safe the length that has piled up anyway.
|
|
77
84
|
|
|
78
|
-
##
|
|
85
|
+
## The unit of work is a merged PR, not an open one
|
|
79
86
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
An open draft is not work: its merge button is locked, main has none of its edits, and the work
|
|
88
|
+
queue is not shortened by it. Eighteen open drafts and not one merged is zero done, however much
|
|
89
|
+
time went into them.
|
|
83
90
|
|
|
84
|
-
|
|
91
|
+
Hence the order: one work is brought to the merge, then the next is taken. Not the other way
|
|
92
|
+
round.
|
|
85
93
|
|
|
86
|
-
##
|
|
94
|
+
## The price of a stack grows quadratically
|
|
87
95
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
Branches of one base that append to the same texts bring each other down at every merge: the
|
|
97
|
+
first merged makes the rest stale, the second merged — all but two, and so to the end. Opening
|
|
98
|
+
all at once, the executor assigns themselves about half the square of their number in merges of
|
|
99
|
+
main — and they do them, while a person presses the merges at their own pace.
|
|
92
100
|
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
This is counted before opening, not after: closing surplus PRs is cheaper than keeping them, but
|
|
102
|
+
the time spent on their bodies is gone by then.
|
|
95
103
|
|
|
96
|
-
##
|
|
104
|
+
## Main is merged in on an actual conflict, not on a schedule
|
|
97
105
|
|
|
98
|
-
|
|
99
|
-
|
|
106
|
+
A lagging branch and a conflicting one are different things. A lagging one the host merges
|
|
107
|
+
itself: edits of different places in one file are reconciled without a person. Only the one
|
|
108
|
+
where both sides touched the same lines conflicts.
|
|
100
109
|
|
|
101
|
-
|
|
102
|
-
|
|
110
|
+
So after someone else's merge, main is merged not into all open branches but into those the host
|
|
111
|
+
said conflict. This is asked with one call for the whole stack:
|
|
103
112
|
|
|
104
113
|
```bash
|
|
105
114
|
gh pr list --state open --json number,headRefName,mergeable \
|
|
106
115
|
--jq '.[] | select(.mergeable == "CONFLICTING") | "\(.number)\t\(.headRefName)"'
|
|
107
116
|
```
|
|
108
117
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
118
|
+
The answer `UNKNOWN` means the host is still counting, not that there is no conflict: the call
|
|
119
|
+
is repeated after a few seconds. Merging "just in case" is that very quadratic price, and it is
|
|
120
|
+
paid for a state that most often is not there.
|
|
121
|
+
|
|
122
|
+
## A stack without PRs lags silently
|
|
123
|
+
|
|
124
|
+
The call above knows only open PRs. A stack of local branches has no PRs at all: there is
|
|
125
|
+
nothing to ask about it, and it lags whole — many branches, one tip, and that is the one usually
|
|
126
|
+
looked at.
|
|
127
|
+
|
|
128
|
+
The price grows with time. While there are no PRs, main's tip is merged into the lowest branch,
|
|
129
|
+
and then each next one absorbs the previous by one merge. After opening, the same edit costs as
|
|
130
|
+
many updated PRs as there are branches in the stack — and until then the delivery guard will not
|
|
131
|
+
let a single one open: it demands main's tip as an ancestor of the branch.
|
|
132
|
+
|
|
133
|
+
The sign is read offline, one command per branch:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
for br in $(git branch --format='%(refname:short)' --list '<КЛЮЧ>-*'); do
|
|
137
|
+
git merge-base --is-ancestor origin/<главная> "$br" || echo "$br отстала"
|
|
138
|
+
done
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
A stack of forty-one branches lagged eighteen commits at once that way, and not one PR from it
|
|
142
|
+
would have opened.
|
|
112
143
|
|
|
113
|
-
##
|
|
144
|
+
## An index everyone appends to is declared a union
|
|
114
145
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
146
|
+
The list of closed works, the spec table of contents, the task list — files where every branch
|
|
147
|
+
adds a line at the end. They conflict out of nothing on every branch of the stack, and their
|
|
148
|
+
resolution is one: both sides are needed whole. This is declared once, in `.gitattributes`:
|
|
118
149
|
|
|
119
150
|
```
|
|
120
151
|
docs/archive/README.md merge=union
|
|
121
152
|
```
|
|
122
153
|
|
|
123
|
-
|
|
124
|
-
|
|
154
|
+
The union is set only on indexes where an edit is always an addition. On text that gets
|
|
155
|
+
rewritten it leaves both versions in the file.
|
|
125
156
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
157
|
+
**The union of sides does not clear the mergeability mark, and main must not be merged in by
|
|
158
|
+
it.** The host counts mergeability by its own technique and does not read merge settings: a
|
|
159
|
+
branch that touched a unioned index is marked conflicting all the same. A stack asked from it
|
|
160
|
+
answers "conflicting" whole, and merging by that answer is the same merging into all branches
|
|
161
|
+
as without the union: the section on an actual conflict tells to merge main in on the fact, and
|
|
162
|
+
the host names that fact for every branch of the stack. Fifteen PRs stood like that at once in
|
|
163
|
+
one session. Checked with one command: the same merge without the driver gives a conflict
|
|
164
|
+
marker, with the driver it goes clean — so the mark is held by the index, not by the edit.
|
|
134
165
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
общих файлов.
|
|
166
|
+
**An index every branch of the stack appends to is removed from the stack, not unioned.** The
|
|
167
|
+
union fixes the symptom: there is no conflict, there is a mark, merging is still needed. This is
|
|
168
|
+
asked before the branches are created: does the index answer a question that a directory walk
|
|
169
|
+
does not close. If not — it is removed, and the stack's overlap drops to the real shared files.
|
|
140
170
|
|
|
141
|
-
##
|
|
171
|
+
## The merge order is set in advance and named to the owner
|
|
142
172
|
|
|
143
|
-
|
|
173
|
+
The order is counted before the PRs open — by who edits which files:
|
|
144
174
|
|
|
145
175
|
```bash
|
|
146
176
|
for b in $(git branch --list '<префикс>-*' --format='%(refname:short)'); do
|
|
@@ -148,17 +178,16 @@ for b in $(git branch --list '<префикс>-*' --format='%(refname:short)');
|
|
|
148
178
|
done | sort | uniq -c | sort -rn | head
|
|
149
179
|
```
|
|
150
180
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
181
|
+
Branches editing the same file go one after another: parted by someone else's merges, they will
|
|
182
|
+
gather a conflict where in a row there would be none. The order is named to the owner in the PR
|
|
183
|
+
body — they press the buttons, and they do not know the branch kinship.
|
|
154
184
|
|
|
155
|
-
##
|
|
185
|
+
## A wave of branches is checked by a trial merge
|
|
156
186
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
работы.
|
|
187
|
+
A branch lying unmerged next to its neighbours is green on its own: lint, tests, builds and
|
|
188
|
+
audits it passes alone. It collides with them on what no check sees on a single branch — the
|
|
189
|
+
same next free scenario number, the same newly created file, the same edited mark line. After
|
|
190
|
+
the merge the first two are fixed already in main and cost a separate work.
|
|
162
191
|
|
|
163
192
|
```bash
|
|
164
193
|
git fetch origin
|
|
@@ -168,18 +197,18 @@ npm run check:all
|
|
|
168
197
|
git checkout - && git branch -D probe-merge
|
|
169
198
|
```
|
|
170
199
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
##
|
|
175
|
-
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
-
|
|
185
|
-
|
|
200
|
+
The trial branch is deleted, and the findings and the merge order are written where the epic
|
|
201
|
+
plan lives: a trial merge answers "what will collide", it does not replace the handover.
|
|
202
|
+
|
|
203
|
+
## Common misses
|
|
204
|
+
|
|
205
|
+
- All PRs opened at once because the branches were ready. A branch's readiness does not say it
|
|
206
|
+
is time to hand it over: as much is handed over as the owner has time to merge.
|
|
207
|
+
- Main merged into all open branches after every foreign merge. Half of these merges changed
|
|
208
|
+
nothing: the branches did not conflict, and their mergeability was not asked.
|
|
209
|
+
- The state of the stack derived from one's own tree, not asked from the host. Locally merged
|
|
210
|
+
main says nothing about mergeability: between the merge and the owner's look main moves ahead.
|
|
211
|
+
- The stack handed over without an order. The owner merges in list order, that is, by number —
|
|
212
|
+
and two branches of one file land on each other exactly when a third stood between them.
|
|
213
|
+
- Time spent on PR bodies instead of bringing the first to the merge. The body is needed by
|
|
214
|
+
whoever reads the PR; a PR whose turn comes in a day has no reader today.
|