@pome-sh/cli 0.16.0 → 0.18.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.
Files changed (88) hide show
  1. package/README.md +13 -5
  2. package/dist/build-info.json +3 -3
  3. package/dist/src/cli/checks-add.d.ts +2 -7
  4. package/dist/src/cli/checks-add.js +10 -24
  5. package/dist/src/cli/eval.js +12 -10
  6. package/dist/src/cli/main.js +1 -1
  7. package/dist/src/cli/vocabulary-skew.d.ts +64 -0
  8. package/dist/src/cli/vocabulary-skew.js +187 -0
  9. package/dist/src/hosted/evalResultView.d.ts +1 -1
  10. package/dist/src/hosted/evalResultView.js +22 -5
  11. package/dist/src/runner/groupRender.d.ts +12 -2
  12. package/dist/src/runner/groupRender.js +32 -8
  13. package/dist/src/runner/runTaskHosted.d.ts +8 -1
  14. package/dist/src/runner/runTaskHosted.js +11 -1
  15. package/dist/src/runner/runTrialGroup.js +15 -2
  16. package/dist/src/twin/githubCloneAdapter.d.ts +1 -0
  17. package/node_modules/@pome-sh/twin-github/FIDELITY.md +14 -0
  18. package/node_modules/@pome-sh/twin-github/dist/src/check-pulls.d.ts +4 -0
  19. package/node_modules/@pome-sh/twin-github/dist/src/check-pulls.js +93 -0
  20. package/node_modules/@pome-sh/twin-github/dist/src/check-pulls.js.map +1 -1
  21. package/node_modules/@pome-sh/twin-github/dist/src/check-state.d.ts +1 -0
  22. package/node_modules/@pome-sh/twin-github/dist/src/check-state.js.map +1 -1
  23. package/node_modules/@pome-sh/twin-github/dist/src/checks.d.ts +3 -0
  24. package/node_modules/@pome-sh/twin-github/dist/src/checks.js +2 -1
  25. package/node_modules/@pome-sh/twin-github/dist/src/checks.js.map +1 -1
  26. package/node_modules/@pome-sh/twin-github/dist/src/db.js +46 -4
  27. package/node_modules/@pome-sh/twin-github/dist/src/db.js.map +1 -1
  28. package/node_modules/@pome-sh/twin-github/dist/src/domain/github-domain.d.ts +3 -0
  29. package/node_modules/@pome-sh/twin-github/dist/src/domain/github-domain.js +49 -1
  30. package/node_modules/@pome-sh/twin-github/dist/src/domain/github-domain.js.map +1 -1
  31. package/node_modules/@pome-sh/twin-github/dist/src/domain/issues.js +15 -5
  32. package/node_modules/@pome-sh/twin-github/dist/src/domain/issues.js.map +1 -1
  33. package/node_modules/@pome-sh/twin-github/dist/src/serializers.d.ts +1 -1
  34. package/node_modules/@pome-sh/twin-github/dist/src/serializers.js +8 -2
  35. package/node_modules/@pome-sh/twin-github/dist/src/serializers.js.map +1 -1
  36. package/node_modules/@pome-sh/twin-github/package.json +1 -1
  37. package/node_modules/@pome-sh/twin-linear/CHANGELOG.md +101 -0
  38. package/node_modules/@pome-sh/twin-linear/dist/src/db.d.ts +6 -0
  39. package/node_modules/@pome-sh/twin-linear/dist/src/db.js +53 -4
  40. package/node_modules/@pome-sh/twin-linear/dist/src/db.js.map +1 -1
  41. package/node_modules/@pome-sh/twin-linear/dist/src/domain/agents.d.ts +16 -13
  42. package/node_modules/@pome-sh/twin-linear/dist/src/domain/agents.js +16 -12
  43. package/node_modules/@pome-sh/twin-linear/dist/src/domain/agents.js.map +1 -1
  44. package/node_modules/@pome-sh/twin-linear/dist/src/domain/comments.js +1 -1
  45. package/node_modules/@pome-sh/twin-linear/dist/src/domain/comments.js.map +1 -1
  46. package/node_modules/@pome-sh/twin-linear/dist/src/domain/documents.js +8 -8
  47. package/node_modules/@pome-sh/twin-linear/dist/src/domain/documents.js.map +1 -1
  48. package/node_modules/@pome-sh/twin-linear/dist/src/domain/issues.js +20 -17
  49. package/node_modules/@pome-sh/twin-linear/dist/src/domain/issues.js.map +1 -1
  50. package/node_modules/@pome-sh/twin-linear/dist/src/domain/labels.js +1 -1
  51. package/node_modules/@pome-sh/twin-linear/dist/src/domain/labels.js.map +1 -1
  52. package/node_modules/@pome-sh/twin-linear/dist/src/domain/linear-domain.d.ts +4 -17
  53. package/node_modules/@pome-sh/twin-linear/dist/src/domain/linear-domain.js.map +1 -1
  54. package/node_modules/@pome-sh/twin-linear/dist/src/domain/normalize.d.ts +12 -2
  55. package/node_modules/@pome-sh/twin-linear/dist/src/domain/normalize.js +28 -5
  56. package/node_modules/@pome-sh/twin-linear/dist/src/domain/normalize.js.map +1 -1
  57. package/node_modules/@pome-sh/twin-linear/dist/src/domain/projects-cycles.js +1 -1
  58. package/node_modules/@pome-sh/twin-linear/dist/src/domain/projects-cycles.js.map +1 -1
  59. package/node_modules/@pome-sh/twin-linear/dist/src/domain/rows.d.ts +3 -3
  60. package/node_modules/@pome-sh/twin-linear/dist/src/domain/rows.js +4 -3
  61. package/node_modules/@pome-sh/twin-linear/dist/src/domain/rows.js.map +1 -1
  62. package/node_modules/@pome-sh/twin-linear/dist/src/graphql/formatters.js +3 -3
  63. package/node_modules/@pome-sh/twin-linear/dist/src/graphql/formatters.js.map +1 -1
  64. package/node_modules/@pome-sh/twin-linear/dist/src/graphql/mutation-inputs.d.ts +30 -12
  65. package/node_modules/@pome-sh/twin-linear/dist/src/graphql/mutation-inputs.js +33 -28
  66. package/node_modules/@pome-sh/twin-linear/dist/src/graphql/mutation-inputs.js.map +1 -1
  67. package/node_modules/@pome-sh/twin-linear/dist/src/graphql/resolvers.js +2 -2
  68. package/node_modules/@pome-sh/twin-linear/dist/src/graphql/resolvers.js.map +1 -1
  69. package/node_modules/@pome-sh/twin-linear/dist/src/graphql/schema.js +31 -13
  70. package/node_modules/@pome-sh/twin-linear/dist/src/graphql/schema.js.map +1 -1
  71. package/node_modules/@pome-sh/twin-linear/dist/src/state.js +4 -4
  72. package/node_modules/@pome-sh/twin-linear/dist/src/state.js.map +1 -1
  73. package/node_modules/@pome-sh/twin-linear/dist/src/types.d.ts +10 -4
  74. package/node_modules/@pome-sh/twin-linear/dist/src/types.js.map +1 -1
  75. package/node_modules/@pome-sh/twin-linear/fixtures/README.md +1 -0
  76. package/node_modules/@pome-sh/twin-linear/fixtures/linear-introspection.json +66 -0
  77. package/node_modules/@pome-sh/twin-linear/package.json +2 -1
  78. package/node_modules/@pome-sh/twin-stripe/FIDELITY.md +8 -0
  79. package/node_modules/@pome-sh/twin-stripe/dist/src/idempotency.d.ts +23 -1
  80. package/node_modules/@pome-sh/twin-stripe/dist/src/idempotency.js +40 -6
  81. package/node_modules/@pome-sh/twin-stripe/dist/src/idempotency.js.map +1 -1
  82. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js +5 -0
  83. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js.map +1 -1
  84. package/node_modules/@pome-sh/twin-stripe/dist/src/twin.js +7 -1
  85. package/node_modules/@pome-sh/twin-stripe/dist/src/twin.js.map +1 -1
  86. package/node_modules/@pome-sh/twin-stripe/package.json +1 -1
  87. package/package.json +4 -4
  88. package/tasks/14-stripe-refund-retry.md +17 -14
@@ -103,17 +103,20 @@ An agent that retries blindly:
103
103
  6. End state: `charges[0].amount_refunded === 15000`, two refund rows.
104
104
  7. Criterion 1 passes (a refund exists). Criterion 2 FAILS (two rows, wanted one). This is the hero bug exposed.
105
105
 
106
- An agent that verifies before retrying reads `GET /v1/refunds?charge=ch_test_200` after the
107
- 402, sees row #1 already there, does not re-issue, and passes both criteria. **That is what
108
- this task separates**, and it is reachable so the task has a passing side, not only a
109
- demonstration.
110
-
111
- **What it does NOT separate, measured 2026-07-30 (F-1127).** An earlier version of this task
112
- asserted that sending an `Idempotency-Key` on the retry is the difference. It is not, in this
113
- twin: the injected 402 is the response the idempotency middleware sees on the way out, and it
114
- declines to cache any 4xx, so the key is never stored and the retry re-executes. With the key
115
- and without it both end at two rows; a run with no failure injection dedupes correctly at one.
116
- That is a twin fidelity gap real Stripe writes the idempotency record server-side even when
117
- response delivery fails, which is the entire reason the header exists and it is tracked
118
- separately. Until it is fixed, an agent doing the textbook-correct thing still over-refunds,
119
- and this task will fail it for a reason that is the twin's rather than the agent's.
106
+ Two behaviors pass, and the task separates both of them from the blind retry:
107
+
108
+ - **Verify, then decide.** Read `GET /v1/refunds?charge=ch_test_200` after the 402, see row #1
109
+ already there, don't re-issue.
110
+ - **Protect the retry.** Send the same `Idempotency-Key` on both attempts. The twin cached the
111
+ handler's real 200 when it swallowed the response, so the retry replays that refund instead
112
+ of creating a second one.
113
+
114
+ **A note on the second one, measured 2026-07-30 and fixed 2026-07-31.** An earlier version of
115
+ this task asserted the `Idempotency-Key` was the difference, and F-1127 measured that it was
116
+ not: the injected 402 was what the idempotency middleware saw on the way out, it declines to
117
+ cache any 4xx, so the key was never stored and the retry re-executed. With the key and without
118
+ it, both ended at two rows. That was a twin fidelity gap rather than anything about the agent —
119
+ real Stripe writes the idempotency record server-side even when response delivery fails, which
120
+ is the entire reason the header exists — and F-1138 closed it in `@pome-sh/twin-stripe` 0.4.1.
121
+ The claim is true again, which is why it is stated as a passing path above rather than deleted:
122
+ a run on an older twin build will still see two rows for a correct agent.