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

Upstream: conflict at ebc0adc #9040

Closed opened this
Closed without merging

This pull now holds one fix: when a tell's title is its first line, the issue body is the text after that line. Before, the body was always empty or the whole text. What changed src/actions/tell.ts: the old test text === firstLine was true only when the text was a single line.

Notes

stopped closed without shipping deploy fe79382

opened this

This pull now holds one fix: when a tell's title is its first line, the issue body is the text after that line. Before, the body was always empty or the whole text.

What changed

  • src/actions/tell.ts: the old test text === firstLine was true only when the text was a single line. Otherwise the body repeated the title along with everything after it. The body is now text.slice(firstLine.length).trim() when the title equals the first line. When the title was cut short, the body keeps the whole text, so nothing said is lost.
  • test/tell-body.test.ts: covers both branches.
  • Reverted the reformat of told(), as the line comment asked. The diff against main is now the body change and its test only.

Checks run bun x tsc --noEmit is clean and test/tell-body.test.ts passes (2 tests). I did not run scripts/gate.ts or the wider suite. The forge runs the full check on this push.

Where I disagree I can't link an issue or say what conflict was resolved. The pull's title comes from the upstream-sync run, "Upstream: conflict at ebc0adc". The merge commit 162482b6 kept this repository's tree and took only this one upstream fix. I have no issue that asked for it. If a person finds no direction for it, closing the pull is the right call.

Not done I did not retitle the pull. I can't change the title from here.

Try it Tell the forge a two-line text, such as "Fix the login\nIt fails on Safari." The new issue's title is "Fix the login" and its body is "It fails on Safari."

Continues #9040

2 earlier comments · 1 event
Changes requested — before the latest push

No security finding: the body is built from already-validated text, capped by MAX_BODY, and the logic is correct (title equals firstLine, so the slice drops exactly the title). Two things to fix in one round:

  1. Scope. The reformat of told() is unrelated to the fix. Revert it so the diff is the body change and its test only.
  2. Intent. The pull is titled "Upstream: conflict at ebc0adc" but contains a tell-body fix, with no issue or description saying what conflict was resolved or why this change is wanted. Direction is PIPELINE FIRST and nothing in the list covers this. Link the issue that asked for it and retitle/describe the pull to match, or drop it.

The tests do cover both branches. A tell from the terminal goes through the same action, so both doors are unaffected.

commented

This pull now holds one fix: when a tell's title is its first line, the issue body is the text after that line. Before, the body was always empty or the whole text.

What changed

  • src/actions/tell.ts: the old test text === firstLine was true only when the text was a single line. Otherwise the body repeated the title along with everything after it. The body is now text.slice(firstLine.length).trim() when the title equals the first line. When the title was cut short, the body keeps the whole text, so nothing said is lost.
  • test/tell-body.test.ts: covers both branches.
  • Reverted the reformat of told(), as the line comment asked. The diff against main is now the body change and its test only.

Checks run bun x tsc --noEmit is clean and test/tell-body.test.ts passes (2 tests). I did not run scripts/gate.ts or the wider suite. The forge runs the full check on this push.

Where I disagree I can't link an issue or say what conflict was resolved. The pull's title comes from the upstream-sync run, "Upstream: conflict at ebc0adc". The merge commit 162482b6 kept this repository's tree and took only this one upstream fix. I have no issue that asked for it. If a person finds no direction for it, closing the pull is the right call.

Not done I did not retitle the pull. I can't change the title from here.

Try it Tell the forge a two-line text, such as "Fix the login\nIt fails on Safari." The new issue's title is "Fix the login" and its body is "It fails on Safari."

commented

This is Pull 1 of the port from Jay Moran's fork (#9030). It is on a fresh branch off main, mason/9030-build-pins, which I pushed with git push origin HEAD:refs/heads/mason/9030-build-pins. I did not reuse mason/9030-upstream-conflict-at-ebc0adc and left it as it was. If the forge doesn't open a pull for the new branch by itself, someone will need to open it.

The tests I ran pass: bun x tsc --noEmit and scripts/gate.ts are clean. The new build-pins-api test (6 tests), apps-build-preview (9) and the openapi, contract, proxy and apps tests I picked (about 480 in total) pass. I did not run the whole suite, since scripts/fast.ts named 1723 of 2027 files, which is too many to run here. I did not start the app or check this pull's preview. There are no web pages in this pull, so design-lint was not needed.

What moved

  • Build environment in apps/data.ts: build-<sha7> is a new environment name, with buildEnv, envBuild, envHostLabel, buildEnvFromLabel and envWords. A slug shaped like b plus seven hex digits is now reserved (core/apps.ts).
  • AppsRuntime.previewBuild: serves one commit now. Asking again for the same commit redeploys nothing. At most three run per app, and a fourth takes the oldest's place. They live only in memory, and a restarted forge removes any left on disk.
  • Addressing: parseAppHost and parseAppLogin read <slug>--b<sha7>. The "unavailable" page says a build preview is gone, not a closed pull.
  • Code that assumed any non-production environment is a pull: commitFor, the looks sweep, the ssh login in the TUI and the reconcile loop now check for a pull number first.
  • git/branches.ts: exactRefOid and moveRefLeased, taken as Jay wrote them. Nothing calls them yet; Pull 2 and the demo pull need them.
  • Taken whole from his side: git/builds.ts, core/intent_notes.ts, actions/builds.ts and actions/build_preview.ts. I swapped actions/builds.ts's writerOf import for a local copy so it doesn't pull in pin_demos.
  • ForgeConfig.notesIntent: set from FORGE_NOTES_INTENT. A person's build note is copied once into that doc.
  • API: a new src/http/api/builds.ts with GET/POST /builds, DELETE/PATCH /builds/:label and POST /builds/preview. The openapi rows are his, minus the demo wording, and the route index is regenerated.
  • Docs: a paragraph in docs/APPS.md.

Tests

  • apps-build-preview (taken from his side): I removed the --demo host checks and the web-form step, which belong to later pulls.
  • build-pins-api (new): covers pin, list, conflict, reader refused (403), note, copy into the intent doc, delete, and the lease behaviour of the two git helpers.
  • pin-notes (his): I did not take it, because it drives the web pages that come in Pull 2.

Left out

  • Not in this pull: frameSrc (the CSP change, for Pull 2 with Iterations), the demo environment, the app.pages/app.launch manifest fields, and every web page, arcade, display and screenshot file.
  • Your call: the wording rewrite, flow-only, budget-retry and merge-proof files are left out, as you said. This pull does not close #9030, and there is no merge of his head.

Try it: bun test test/build-pins-api.test.ts test/apps-build-preview.test.ts. As a writer with a verified email, run curl -X POST -H "authorization: Bearer $TOKEN" -d '{"sha":"<full commit id>"}' $FORGE_URL/api/v1/repos/<owner>/<repo>/builds/preview. It answers 201 with { env, url }, and the app serves at <slug>--b<sha7>.

Co-authored-by: Jay Moran <[email protected]>

🤖 Generated with Claude Code

commented

Closing: this branch still holds the merge of his head with only one fix (all 149 commits would read as merged). That tell fix can come in by itself in the pins port. Replaced by a fresh issue so the branch is new.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs