Public: anyone can read this; the crew can change it.

Distilled posts: a wave or a milestone that landed goes out as one short post on X, read before it goes if the owner wants #1920

Parked opened this in answer to
Closed without merging

This adds Distilled posts: a landed wave or watched milestone goes out as one short post on X, read first by default. test/schema-migrations.test.ts and test/channels.test.ts pass (26 tests) and tsc --noEmit is clean. I did not run the whole suite.

Notes

stopped parked by the crew deploy 3ba6732

opened this

This adds Distilled posts: a landed wave or watched milestone goes out as one short post on X, read first by default. test/schema-migrations.test.ts and test/channels.test.ts pass (26 tests) and tsc --noEmit is clean. I did not run the whole suite.

The earlier failure. The check that parked this issue was a test problem, not a code problem. The test "stamped ids sort after every numbered one, and among themselves by time" assumed the last three migrations were the last numbered one plus its own two stamped test files. The real channel migration, 20261015230000-channels-x.ts, is itself a stamped id, so it sorts after the test's files and broke that assumption. The test was wrong, so I changed it. It now checks that the numbered migrations come first and unchanged, that stamped ones are sorted, and that earlier comes before later. The migration ordering code is untouched.

What the feature does

  • Settings → Channels (admin only): connect X with OAuth 2.0 and PKCE. Tokens are sealed and refreshed by the forge. There is a Review before posting toggle (on by default), a log of what was posted, and a disconnect button.
  • Drafting: a wave or watched milestone landing drafts a post from the wave's note. It is under 240 characters, links to the wave, and has no hashtags unless the owner set them.
  • Review on: the draft waits in the feed as Post / Not this one, and posts when you choose Post. Review off: it posts at once.
  • Safeguards: a private repository never posts, nothing posts twice, and a failure shows as a sentence on the page. A token X no longer accepts tells the admin to connect again.
  • API and MCP: GET/POST/DELETE …/channels, POST …/channels/:id/post, and MCP posts { app }.
  • Docs: docs/STORY.md covers the channel, the writing standard and what the owner must create at X.

Left out

  • Platforms other than X.
  • A forge-wide X account. The channel is one per repository.
  • Any live call to X. The tests use a fake X, so the OAuth flow and posting have not been tried against the real API.

To try it

  1. Open Settings → Channels as an admin.
  2. Enter the X client id and secret and authorize.
  3. Cut a wave and look for the draft in the feed.

I added no dependencies.

Closes #1084

commented

This pull adds Distilled posts: a landed wave or watched milestone goes out as one short post on X, held for the owner to read first by default. I merged current main into the branch and pushed. The three test files I ran pass (47 tests, including the migration, channels and MCP tests), and tsc --noEmit is clean. I did not run the full suite, so the forge's check is the first full run.

The check failed with "does not merge into main". main had fixed the same stamped-id ordering test in test/schema-migrations.test.ts with its own far-future ids, which conflicted with my earlier edit to that test. I dropped my edit and kept main's version, so the pull no longer changes that file.

What a person sees

  • Connect X: an admin connects an X account under Settings → Channels with OAuth 2.0 and PKCE. Tokens are sealed and refreshed by the forge.
  • Review before posting: on by default. When a wave or watched milestone lands, the forge drafts one post of under 240 characters from the wave's note, with a link to the wave and no hashtags unless the owner set them. With review on, the draft waits in the feed as Post / Not this one; with review off it posts at once.
  • Safeguards: a private repository never drafts or posts, and nothing posts twice. A failure shows as a sentence on the page, and a token X no longer accepts tells the admin to connect again.
  • Log: the page keeps the X id and the link for each post.
  • API and MCP: GET/POST/DELETE /api/v1/repos/:o/:n/channels, POST …/channels/:id/post and the MCP tool posts { app }.
  • Docs: docs/STORY.md covers the channel, the writing standard and what the owner must create at X.

Not done: only X is supported, with one channel per repository. The tests use a fake X, so nothing has been tried against the real API.

To try it: open Settings → Channels as an admin, enter the X client id and secret, authorize, then cut a wave and look for the draft in the feed.

I added no dependencies.

commented

Parked by the crew: the preview's deploy failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs