[{"data":1,"prerenderedAt":1637},["ShallowReactive",2],{"post-\u002Fblog\u002Fone-way-to-fail":3,"blog-all":1141},{"id":4,"title":5,"author":6,"body":7,"category":1124,"date":1125,"description":1126,"draft":1127,"extension":1128,"image":1129,"meta":1130,"navigation":94,"path":1131,"project":1132,"readingMinutes":222,"seo":1133,"series":1134,"seriesOrder":1134,"stem":1135,"tags":1136,"__hash__":1140},"blog\u002Fblog\u002Fone-way-to-fail.md","One Way to Fail","EkoHacks Team",{"type":8,"value":9,"toc":1114},"minimark",[10,19,22,27,50,53,136,139,238,241,245,252,259,326,332,407,416,420,434,514,524,548,564,568,571,575,578,759,766,770,782,955,969,973,976,1091,1100,1104,1107,1110],[11,12,13,14,18],"p",{},"An upload should fail the same way everything else fails. For a while ours did not. A failed method already came back as ",[15,16,17],"code",{},"{ code, message }",", but the upload route still had a reply or two in an older shape, and a test sat parked on that gap so it could not be quietly forgotten. This is the post where the gap closes.",[11,20,21],{},"It is worth saying what closing it actually took, because it was not more code. Most of the work that finished the smoke test, the one that proves you can upload a BAM file and watch it land, was deletion. An upload learned to fail the same way every other call fails, and the way it learned was by giving back things we had grown along the way. Here is EkoLite, our small real time backend, losing weight.",[23,24,26],"h2",{"id":25},"the-server-learns-to-say-no","The server learns to say no",[11,28,29,30,33,34,37,38,41,42,45,46,49],{},"Before any of the client work, the route was indiscriminate. ",[15,31,32],{},"POST \u002Fapi\u002Ffiles"," would write a ",[15,35,36],{},".txt"," or a ",[15,39,40],{},".zip"," to disk as happily as a ",[15,43,44],{},".bam",", because nothing looked at the name before saving. The first change was a gate, and it went where uploads already live, in ",[15,47,48],{},"Files",", the class that saves the bytes and records the document.",[11,51,52],{},"The rule is a pure check, and the allowed set is configurable rather than a buried literal:",[54,55,60],"pre",{"className":56,"code":57,"language":58,"meta":59,"style":59},"language-ts shiki shiki-themes github-dark","const ALLOWED_EXTENSIONS = ['bam'];\n\nvalidate(name: string): boolean {\n  return this.isAllowed(extensionOf(name));\n}\n","ts","",[15,61,62,89,96,106,130],{"__ignoreMap":59},[63,64,67,71,75,78,82,86],"span",{"class":65,"line":66},"line",1,[63,68,70],{"class":69},"snl16","const",[63,72,74],{"class":73},"sDLfK"," ALLOWED_EXTENSIONS",[63,76,77],{"class":69}," =",[63,79,81],{"class":80},"s95oV"," [",[63,83,85],{"class":84},"sU2Wk","'bam'",[63,87,88],{"class":80},"];\n",[63,90,92],{"class":65,"line":91},2,[63,93,95],{"emptyLinePlaceholder":94},true,"\n",[63,97,99,103],{"class":65,"line":98},3,[63,100,102],{"class":101},"svObZ","validate",[63,104,105],{"class":80},"(name: string): boolean {\n",[63,107,109,112,115,118,121,124,127],{"class":65,"line":108},4,[63,110,111],{"class":69},"  return",[63,113,114],{"class":73}," this",[63,116,117],{"class":80},".",[63,119,120],{"class":101},"isAllowed",[63,122,123],{"class":80},"(",[63,125,126],{"class":101},"extensionOf",[63,128,129],{"class":80},"(name));\n",[63,131,133],{"class":65,"line":132},5,[63,134,135],{"class":80},"}\n",[11,137,138],{},"The guard runs before the write, so a refused file never reaches disk or the database:",[54,140,142],{"className":56,"code":141,"language":58,"meta":59,"style":59},"async upload(input: UploadInput): Promise\u003CStoredFile> {\n  const extension = extensionOf(input.name);\n  if (!this.isAllowed(extension)) {\n    throw fileUploadError(extension);\n  }\n\n  await this.storage.save(input.name, input.data);\n  \u002F\u002F build the document, insert it, return it\n}\n",[15,143,144,170,184,199,210,215,220,226,233],{"__ignoreMap":59},[63,145,146,149,152,155,158,161,164,167],{"class":65,"line":66},[63,147,148],{"class":80},"async ",[63,150,151],{"class":101},"upload",[63,153,154],{"class":80},"(input: UploadInput): ",[63,156,157],{"class":73},"Promise",[63,159,160],{"class":69},"\u003C",[63,162,163],{"class":80},"StoredFile",[63,165,166],{"class":69},">",[63,168,169],{"class":80}," {\n",[63,171,172,175,178,181],{"class":65,"line":91},[63,173,174],{"class":80},"  const extension ",[63,176,177],{"class":69},"=",[63,179,180],{"class":101}," extensionOf",[63,182,183],{"class":80},"(input.name);\n",[63,185,186,189,192,196],{"class":65,"line":98},[63,187,188],{"class":101},"  if",[63,190,191],{"class":80}," (!this.isAllowed(",[63,193,195],{"class":194},"s9osk","extension",[63,197,198],{"class":80},")) {\n",[63,200,201,204,207],{"class":65,"line":108},[63,202,203],{"class":69},"    throw",[63,205,206],{"class":101}," fileUploadError",[63,208,209],{"class":80},"(extension);\n",[63,211,212],{"class":65,"line":132},[63,213,214],{"class":80},"  }\n",[63,216,218],{"class":65,"line":217},6,[63,219,95],{"emptyLinePlaceholder":94},[63,221,223],{"class":65,"line":222},7,[63,224,225],{"class":80},"  await this.storage.save(input.name, input.data);\n",[63,227,229],{"class":65,"line":228},8,[63,230,232],{"class":231},"sAwPA","  \u002F\u002F build the document, insert it, return it\n",[63,234,236],{"class":65,"line":235},9,[63,237,135],{"class":80},[11,239,240],{},"A new format later is a line of config, not a code change. And the server is the thing that actually refuses, so a bad file cannot land just because someone bypassed the UI.",[23,242,244],{"id":243},"the-error-we-already-had","The error we already had",[11,246,247,248,251],{},"Look at that ",[15,249,250],{},"throw fileUploadError(extension)",". The first cut of this gave the client its own upload error type, a bespoke shape that only the uploader knew about. It passed its tests. It was also a second error language in a codebase that already had one.",[11,253,254,255,258],{},"So we deleted it. ",[15,256,257],{},"fileUploadError"," is now a one line helper over the error we already had:",[54,260,262],{"className":56,"code":261,"language":58,"meta":59,"style":59},"export function fileUploadError(extension: string): RpcError {\n  return new RpcError(400, `Unsupported file type: .${extension}`);\n}\n",[15,263,264,294,322],{"__ignoreMap":59},[63,265,266,269,272,274,276,278,281,284,287,289,292],{"class":65,"line":66},[63,267,268],{"class":69},"export",[63,270,271],{"class":69}," function",[63,273,206],{"class":101},[63,275,123],{"class":80},[63,277,195],{"class":194},[63,279,280],{"class":69},":",[63,282,283],{"class":73}," string",[63,285,286],{"class":80},")",[63,288,280],{"class":69},[63,290,291],{"class":101}," RpcError",[63,293,169],{"class":80},[63,295,296,298,301,303,305,308,311,314,316,319],{"class":65,"line":91},[63,297,111],{"class":69},[63,299,300],{"class":69}," new",[63,302,291],{"class":101},[63,304,123],{"class":80},[63,306,307],{"class":73},"400",[63,309,310],{"class":80},", ",[63,312,313],{"class":84},"`Unsupported file type: .${",[63,315,195],{"class":80},[63,317,318],{"class":84},"}`",[63,320,321],{"class":80},");\n",[63,323,324],{"class":65,"line":98},[63,325,135],{"class":80},[11,327,328,331],{},[15,329,330],{},"RpcError"," is the same class a failed method call rejects with. The route does not special case it. A single error handler turns any thrown error into the shared envelope and sends it back at the right status:",[54,333,335],{"className":56,"code":334,"language":58,"meta":59,"style":59},"server.setErrorHandler((err, _request, reply) => {\n  const error = toEkoLiteError(err);\n  reply.status(error.code).send(error);\n});\n",[15,336,337,369,385,402],{"__ignoreMap":59},[63,338,339,342,345,348,351,353,356,358,361,364,367],{"class":65,"line":66},[63,340,341],{"class":80},"server.",[63,343,344],{"class":101},"setErrorHandler",[63,346,347],{"class":80},"((",[63,349,350],{"class":194},"err",[63,352,310],{"class":80},[63,354,355],{"class":194},"_request",[63,357,310],{"class":80},[63,359,360],{"class":194},"reply",[63,362,363],{"class":80},") ",[63,365,366],{"class":69},"=>",[63,368,169],{"class":80},[63,370,371,374,377,379,382],{"class":65,"line":91},[63,372,373],{"class":69},"  const",[63,375,376],{"class":73}," error",[63,378,77],{"class":69},[63,380,381],{"class":101}," toEkoLiteError",[63,383,384],{"class":80},"(err);\n",[63,386,387,390,393,396,399],{"class":65,"line":98},[63,388,389],{"class":80},"  reply.",[63,391,392],{"class":101},"status",[63,394,395],{"class":80},"(error.code).",[63,397,398],{"class":101},"send",[63,400,401],{"class":80},"(error);\n",[63,403,404],{"class":65,"line":108},[63,405,406],{"class":80},"});\n",[11,408,409,410,412,413,415],{},"That is the whole convergence. The socket path and the HTTP path now refuse in one shape, ",[15,411,17],{},", and the test we parked on the gap turned green not because we wrote something but because we removed the thing that made the shapes differ. One error language. The client, when we get to it, rejects with the same ",[15,414,330],{}," its method caller already rejects with, so a caller handles an upload failure and a method failure the same way.",[23,417,419],{"id":418},"a-transport-you-can-switch-off","A transport you can switch off",[11,421,422,423,426,427,430,431,280],{},"The client uploader copied a move the socket made long ago. ",[15,424,425],{},"upload()"," never news up an ",[15,428,429],{},"XMLHttpRequest"," of its own, because the moment it does it stops being testable and drags the browser back into a unit test. Instead it takes a transport the way the socket takes a ",[15,432,433],{},"WebSocketFactory",[54,435,437],{"className":56,"code":436,"language":58,"meta":59,"style":59},"static create(): Uploader {\n  return new Uploader(() => new RealRequest());\n}\n\nstatic createNull(options: NullUploaderOptions): Uploader {\n  return new Uploader(() => new NullRequest(options.response));\n}\n",[15,438,439,450,472,476,480,490,510],{"__ignoreMap":59},[63,440,441,444,447],{"class":65,"line":66},[63,442,443],{"class":80},"static ",[63,445,446],{"class":101},"create",[63,448,449],{"class":80},"(): Uploader {\n",[63,451,452,454,456,459,462,464,466,469],{"class":65,"line":91},[63,453,111],{"class":69},[63,455,300],{"class":69},[63,457,458],{"class":101}," Uploader",[63,460,461],{"class":80},"(() ",[63,463,366],{"class":69},[63,465,300],{"class":69},[63,467,468],{"class":101}," RealRequest",[63,470,471],{"class":80},"());\n",[63,473,474],{"class":65,"line":98},[63,475,135],{"class":80},[63,477,478],{"class":65,"line":108},[63,479,95],{"emptyLinePlaceholder":94},[63,481,482,484,487],{"class":65,"line":132},[63,483,443],{"class":80},[63,485,486],{"class":101},"createNull",[63,488,489],{"class":80},"(options: NullUploaderOptions): Uploader {\n",[63,491,492,494,496,498,500,502,504,507],{"class":65,"line":217},[63,493,111],{"class":69},[63,495,300],{"class":69},[63,497,458],{"class":101},[63,499,461],{"class":80},[63,501,366],{"class":69},[63,503,300],{"class":69},[63,505,506],{"class":101}," NullRequest",[63,508,509],{"class":80},"(options.response));\n",[63,511,512],{"class":65,"line":222},[63,513,135],{"class":80},[11,515,516,519,520,523],{},[15,517,518],{},"RealRequest"," delegates to the browser. ",[15,521,522],{},"NullRequest"," simulates a response. Your code runs the same either way, which is the entire point of the off switch.",[11,525,526,527,530,531,534,535,538,539,310,542,544,545,547],{},"There is a small evolution worth naming here, because it is the kind of thing the drawing never gets right. The plan for this named the seam ",[15,528,529],{},"XhrLike",", with a ",[15,532,533],{},"RealXhr"," and a ",[15,536,537],{},"NullXhr",". The code settled on ",[15,540,541],{},"RequestLike",[15,543,518],{}," and ",[15,546,522],{},". The sketch was right about where the seam went and wrong about what to call it, which is the usual split. A plan names the seam. The code names the types, once it can feel which name reads.",[11,549,550,551,553,554,557,558,560,561,563],{},"And the transport is ",[15,552,429],{}," rather than ",[15,555,556],{},"fetch",", even though ",[15,559,556],{}," would make the happy path shorter, because a progress bar is the next slice and ",[15,562,556],{}," cannot report upload progress. We put the seam where the future need already is, so the next story hangs a bar off the same request instead of rewriting it.",[23,565,567],{"id":566},"the-bug-the-seam-let-us-keep-small","The bug the seam let us keep small",[11,569,570],{},"The first version of the uploader held a single request and reused it. That looks fine until two uploads run at once, or one runs after another, and they fight over a request that has already been spent. The fix was one word in the design: hold a factory, not an instance, and mint a fresh request per call. A test that starts two uploads together and expects both to finish pins it so it cannot come back. The seam is what made the bug a one line correction rather than a rewrite.",[23,572,574],{"id":573},"one-place-to-decide","One place to decide",[11,576,577],{},"The last refinement was to keep the resolve or reject decision in one place, reading the status once, so there is a single answer to whether an upload succeeded:",[54,579,581],{"className":56,"code":580,"language":58,"meta":59,"style":59},"private resolveUpload(request: RequestLike): UploadResponse {\n  const parsed: unknown = JSON.parse(request.responseText);\n\n  if (request.status >= 200 && request.status \u003C 300) {\n    if (!isUploadResponse(parsed)) {\n      throw new Error('Invalid upload response');\n    }\n    return parsed;\n  }\n\n  if (!isUploadError(parsed)) {\n    throw new Error('Invalid upload error');\n  }\n  throw new RpcError(parsed.code, parsed.message);\n}\n",[15,582,583,594,619,623,650,667,684,689,697,701,706,720,736,741,754],{"__ignoreMap":59},[63,584,585,588,591],{"class":65,"line":66},[63,586,587],{"class":80},"private ",[63,589,590],{"class":101},"resolveUpload",[63,592,593],{"class":80},"(request: RequestLike): UploadResponse {\n",[63,595,596,598,601,603,606,608,611,613,616],{"class":65,"line":91},[63,597,373],{"class":69},[63,599,600],{"class":73}," parsed",[63,602,280],{"class":69},[63,604,605],{"class":73}," unknown",[63,607,77],{"class":69},[63,609,610],{"class":73}," JSON",[63,612,117],{"class":80},[63,614,615],{"class":101},"parse",[63,617,618],{"class":80},"(request.responseText);\n",[63,620,621],{"class":65,"line":98},[63,622,95],{"emptyLinePlaceholder":94},[63,624,625,627,630,633,636,639,642,644,647],{"class":65,"line":108},[63,626,188],{"class":69},[63,628,629],{"class":80}," (request.status ",[63,631,632],{"class":69},">=",[63,634,635],{"class":73}," 200",[63,637,638],{"class":69}," &&",[63,640,641],{"class":80}," request.status ",[63,643,160],{"class":69},[63,645,646],{"class":73}," 300",[63,648,649],{"class":80},") {\n",[63,651,652,655,658,661,664],{"class":65,"line":132},[63,653,654],{"class":69},"    if",[63,656,657],{"class":80}," (",[63,659,660],{"class":69},"!",[63,662,663],{"class":101},"isUploadResponse",[63,665,666],{"class":80},"(parsed)) {\n",[63,668,669,672,674,677,679,682],{"class":65,"line":217},[63,670,671],{"class":69},"      throw",[63,673,300],{"class":69},[63,675,676],{"class":101}," Error",[63,678,123],{"class":80},[63,680,681],{"class":84},"'Invalid upload response'",[63,683,321],{"class":80},[63,685,686],{"class":65,"line":222},[63,687,688],{"class":80},"    }\n",[63,690,691,694],{"class":65,"line":228},[63,692,693],{"class":69},"    return",[63,695,696],{"class":80}," parsed;\n",[63,698,699],{"class":65,"line":235},[63,700,214],{"class":80},[63,702,704],{"class":65,"line":703},10,[63,705,95],{"emptyLinePlaceholder":94},[63,707,709,711,713,715,718],{"class":65,"line":708},11,[63,710,188],{"class":69},[63,712,657],{"class":80},[63,714,660],{"class":69},[63,716,717],{"class":101},"isUploadError",[63,719,666],{"class":80},[63,721,723,725,727,729,731,734],{"class":65,"line":722},12,[63,724,203],{"class":69},[63,726,300],{"class":69},[63,728,676],{"class":101},[63,730,123],{"class":80},[63,732,733],{"class":84},"'Invalid upload error'",[63,735,321],{"class":80},[63,737,739],{"class":65,"line":738},13,[63,740,214],{"class":80},[63,742,744,747,749,751],{"class":65,"line":743},14,[63,745,746],{"class":69},"  throw",[63,748,300],{"class":69},[63,750,291],{"class":101},[63,752,753],{"class":80},"(parsed.code, parsed.message);\n",[63,755,757],{"class":65,"line":756},15,[63,758,135],{"class":80},[11,760,761,762,765],{},"A 2xx resolves with ",[15,763,764],{},"{ id, name }",". Anything else rejects with the shared error. A 2xx that comes back the wrong shape rejects rather than hanging, so every path settles, one way or the other, and there is one method to read when you want to know what an upload does.",[23,767,769],{"id":768},"two-paths-become-one","Two paths become one",[11,771,772,773,775,776,778,779,781],{},"The demo had been proving the round trip with a throwaway ",[15,774,556],{},", written before the uploader existed. With a real uploader in the tree, keeping the ",[15,777,556],{}," meant two upload paths, and only one of them was the one we ship. So the demo lost its ",[15,780,556],{}," and gained the real surface:",[54,783,785],{"className":56,"code":784,"language":58,"meta":59,"style":59},"const uploader = Uploader.create();\n\u002F\u002F ...\nvoid uploader\n  .upload(file)\n  .then((stored) => log(`in: stored ${stored.name} (${stored.id})`))\n  .catch((err: unknown) => {\n    if (err instanceof RpcError) {\n      log(`upload refused: ${String(err.code)} ${err.message}`);\n    }\n  });\n",[15,786,787,804,809,817,827,874,895,909,946,950],{"__ignoreMap":59},[63,788,789,791,794,796,799,801],{"class":65,"line":66},[63,790,70],{"class":69},[63,792,793],{"class":73}," uploader",[63,795,77],{"class":69},[63,797,798],{"class":80}," Uploader.",[63,800,446],{"class":101},[63,802,803],{"class":80},"();\n",[63,805,806],{"class":65,"line":91},[63,807,808],{"class":231},"\u002F\u002F ...\n",[63,810,811,814],{"class":65,"line":98},[63,812,813],{"class":69},"void",[63,815,816],{"class":80}," uploader\n",[63,818,819,822,824],{"class":65,"line":108},[63,820,821],{"class":80},"  .",[63,823,151],{"class":101},[63,825,826],{"class":80},"(file)\n",[63,828,829,831,834,836,839,841,843,846,848,851,853,855,858,861,863,865,868,871],{"class":65,"line":132},[63,830,821],{"class":80},[63,832,833],{"class":101},"then",[63,835,347],{"class":80},[63,837,838],{"class":194},"stored",[63,840,363],{"class":80},[63,842,366],{"class":69},[63,844,845],{"class":101}," log",[63,847,123],{"class":80},[63,849,850],{"class":84},"`in: stored ${",[63,852,838],{"class":80},[63,854,117],{"class":84},[63,856,857],{"class":80},"name",[63,859,860],{"class":84},"} (${",[63,862,838],{"class":80},[63,864,117],{"class":84},[63,866,867],{"class":80},"id",[63,869,870],{"class":84},"})`",[63,872,873],{"class":80},"))\n",[63,875,876,878,881,883,885,887,889,891,893],{"class":65,"line":217},[63,877,821],{"class":80},[63,879,880],{"class":101},"catch",[63,882,347],{"class":80},[63,884,350],{"class":194},[63,886,280],{"class":69},[63,888,605],{"class":73},[63,890,363],{"class":80},[63,892,366],{"class":69},[63,894,169],{"class":80},[63,896,897,899,902,905,907],{"class":65,"line":222},[63,898,654],{"class":69},[63,900,901],{"class":80}," (err ",[63,903,904],{"class":69},"instanceof",[63,906,291],{"class":101},[63,908,649],{"class":80},[63,910,911,914,916,919,922,924,926,928,930,932,935,937,939,942,944],{"class":65,"line":228},[63,912,913],{"class":101},"      log",[63,915,123],{"class":80},[63,917,918],{"class":84},"`upload refused: ${",[63,920,921],{"class":101},"String",[63,923,123],{"class":84},[63,925,350],{"class":80},[63,927,117],{"class":84},[63,929,15],{"class":80},[63,931,286],{"class":84},[63,933,934],{"class":84},"} ${",[63,936,350],{"class":80},[63,938,117],{"class":84},[63,940,941],{"class":80},"message",[63,943,318],{"class":84},[63,945,321],{"class":80},[63,947,948],{"class":65,"line":235},[63,949,688],{"class":80},[63,951,952],{"class":65,"line":703},[63,953,954],{"class":80},"  });\n",[11,956,957,958,960,961,964,965,968],{},"The demo now runs the exact code production runs. A refused ",[15,959,36],{}," used to log a bare ",[15,962,963],{},"upload failed: 400",". Now it shows the server's own words, ",[15,966,967],{},"upload refused: 400 Unsupported file type: .txt",", because the refusal carries the message the whole way out.",[23,970,972],{"id":971},"the-move-you-can-reproduce","The move you can reproduce",[11,974,975],{},"You do not have to take our word for the off switch, which is the part that matters. A refused upload is testable with no network and no browser. Configure the null uploader with the response a real server would send, and assert the rejection:",[54,977,979],{"className":56,"code":978,"language":58,"meta":59,"style":59},"const uploader = Uploader.createNull({\n  response: { status: 400, body: { code: 400, message: 'Unsupported file type: .txt' } },\n});\n\nawait expect(\n  uploader.upload(new File([Buffer.from('notes')], 'bad.txt')),\n).rejects.toMatchObject({ code: 400, message: 'Unsupported file type: .txt' });\n",[15,980,981,996,1017,1021,1025,1036,1071],{"__ignoreMap":59},[63,982,983,985,987,989,991,993],{"class":65,"line":66},[63,984,70],{"class":69},[63,986,793],{"class":73},[63,988,77],{"class":69},[63,990,798],{"class":80},[63,992,486],{"class":101},[63,994,995],{"class":80},"({\n",[63,997,998,1001,1003,1006,1008,1011,1014],{"class":65,"line":91},[63,999,1000],{"class":80},"  response: { status: ",[63,1002,307],{"class":73},[63,1004,1005],{"class":80},", body: { code: ",[63,1007,307],{"class":73},[63,1009,1010],{"class":80},", message: ",[63,1012,1013],{"class":84},"'Unsupported file type: .txt'",[63,1015,1016],{"class":80}," } },\n",[63,1018,1019],{"class":65,"line":98},[63,1020,406],{"class":80},[63,1022,1023],{"class":65,"line":108},[63,1024,95],{"emptyLinePlaceholder":94},[63,1026,1027,1030,1033],{"class":65,"line":132},[63,1028,1029],{"class":69},"await",[63,1031,1032],{"class":101}," expect",[63,1034,1035],{"class":80},"(\n",[63,1037,1038,1041,1043,1045,1048,1051,1054,1057,1059,1062,1065,1068],{"class":65,"line":217},[63,1039,1040],{"class":80},"  uploader.",[63,1042,151],{"class":101},[63,1044,123],{"class":80},[63,1046,1047],{"class":69},"new",[63,1049,1050],{"class":101}," File",[63,1052,1053],{"class":80},"([Buffer.",[63,1055,1056],{"class":101},"from",[63,1058,123],{"class":80},[63,1060,1061],{"class":84},"'notes'",[63,1063,1064],{"class":80},")], ",[63,1066,1067],{"class":84},"'bad.txt'",[63,1069,1070],{"class":80},")),\n",[63,1072,1073,1076,1079,1082,1084,1086,1088],{"class":65,"line":222},[63,1074,1075],{"class":80},").rejects.",[63,1077,1078],{"class":101},"toMatchObject",[63,1080,1081],{"class":80},"({ code: ",[63,1083,307],{"class":73},[63,1085,1010],{"class":80},[63,1087,1013],{"class":84},[63,1089,1090],{"class":80}," });\n",[11,1092,1093,1094,1096,1097,1099],{},"That test reaches nothing. It runs the real upload logic against a stub of the transport, and it proves the refusal arrives as the shared error. Swap ",[15,1095,486],{}," for ",[15,1098,446],{}," and the identical code talks to a live server. One line is the difference between the test and production, which is the only honest way to know the test was watching the real thing.",[23,1101,1103],{"id":1102},"why-we-work-this-way","Why we work this way",[11,1105,1106],{},"The shape we never drew is finished now, and finishing it was mostly giving things back. One bespoke error type, gone. One spare upload path, gone. One guess about where the collection lived, gone earlier. What is left is smaller than what we started with and says more.",[11,1108,1109],{},"That is the trade emergent design keeps offering, if you let it. You grow a thing to feel its shape, and then, when the shape is clear, you delete your way down to it. The discipline that makes the deletion safe is the same one as always: every piece integrated all the time, a test on every claim, and a deep suspicion of any code that only your own tests seem to need. An upload should fail the same way everything else fails. Now it does.",[1111,1112,1113],"style",{},"html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s9osk, html code.shiki .s9osk{--shiki-default:#FFAB70}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}",{"title":59,"searchDepth":91,"depth":91,"links":1115},[1116,1117,1118,1119,1120,1121,1122,1123],{"id":25,"depth":91,"text":26},{"id":243,"depth":91,"text":244},{"id":418,"depth":91,"text":419},{"id":566,"depth":91,"text":567},{"id":573,"depth":91,"text":574},{"id":768,"depth":91,"text":769},{"id":971,"depth":91,"text":972},{"id":1102,"depth":91,"text":1103},"Design and Architecture","2026-07-20T10:05:00.000Z","Closing the convergence so an upload fails in the same error shape as every other call, mostly by deleting the code that made the two shapes differ.",false,"md","\u002Fimages\u002Fblog\u002Fone-way-to-fail-hero.jpg",{},"\u002Fblog\u002Fone-way-to-fail","EkoLite",{"title":5,"description":1126},null,"blog\u002Fone-way-to-fail",[1137,1138,1139],"design","nullables","error handling","1F8EsIWeATp08S_nwJOGPGxxb4v6L1VGVfSgWCHuk34",[1142,1154,1166,1173,1183,1189,1198,1205,1212,1221,1228,1237,1244,1251,1263,1265,1272,1279,1288,1296,1304,1314,1321,1329,1336,1342,1348,1357,1365,1375,1383,1390,1400,1408,1414,1424,1433,1441,1449,1457,1465,1472,1480,1488,1495,1501,1508,1517,1525,1532,1539,1548,1554,1562,1568,1576,1582,1591,1598,1605,1613,1619,1625,1631],{"path":1143,"title":1144,"description":1145,"date":1146,"author":6,"image":1147,"readingMinutes":217,"category":1148,"project":1149,"tags":1150,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fa-branch-is-inventory","A Branch Is Inventory","Unintegrated code is stock in a warehouse, and it depreciates. Our branch was one merge behind the trunk and that was enough for a conflict. What waiting costs.","2026-07-09T09:38:00.000Z","\u002Fimages\u002Fblog\u002Fa-branch-is-inventory-hero.jpg","Craft and Practice","The Dojo",[1151,1152,1153],"git","continuous-integration","craft",{"path":1155,"title":1156,"description":1157,"date":1158,"author":6,"image":1134,"readingMinutes":222,"category":1159,"project":1160,"tags":1161,"draft":1127,"series":1165,"seriesOrder":98},"\u002Fblog\u002Fa-map-drawn-by-the-build","A Map Drawn by the Build","Thirty six of our pages had never been visited by Google because nothing said they existed. The sitemap is drawn from the build, and it found a draft.","2026-08-22T20:30:00.000Z","Shipping and Operations","ekohacks.com",[1162,1163,1164],"seo","operations","nuxt","From Invisible to Findable",{"path":1167,"title":1168,"description":1169,"date":1170,"author":6,"image":1134,"readingMinutes":217,"category":1159,"project":1160,"tags":1171,"draft":1127,"series":1165,"seriesOrder":235},"\u002Fblog\u002Fa-privacy-policy-you-can-diff","A Privacy Policy You Can Diff","Our legal pages are files in the same repository as the site. Each now lists every change to its text, with the date and the diff, drawn from git at build time.","2026-08-23T16:00:00.000Z",[1172,1163,1164],"privacy",{"path":1174,"title":1175,"description":1176,"date":1177,"author":6,"image":1178,"readingMinutes":222,"category":1179,"project":1132,"tags":1180,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fan-off-switch-not-a-disguise","An Off Switch, Not a Disguise","A Nullable differs from a stub in whether production code can tell the fake is there. Finding the word fixed a socket wrapper that had been lying to its tests.","2026-07-20T09:05:00.000Z","\u002Fimages\u002Fblog\u002Fan-off-switch-not-a-disguise-hero.jpg","Testing and TDD",[1138,1181,1182],"testing","websocket",{"path":1184,"title":1185,"description":1186,"date":1187,"author":6,"image":1188,"readingMinutes":108,"category":1148,"project":1134,"tags":1134,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fbuilding-engineering-teams-that-learn-together","Building Engineering Teams That Learn Together","The strongest engineering teams are not the ones with the most talented individuals. They are the ones that have learned how to learn together.","2026-02-05T09:00:00.000Z","\u002Fimages\u002Fblog\u002Fteams-that-learn-together-hero.jpg",{"path":1190,"title":1191,"description":1192,"date":1193,"author":6,"image":1194,"readingMinutes":108,"category":1159,"project":1149,"tags":1195,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fderived-state-recompute","The Fix Was Merged, but the Numbers Were Still Wrong","We fixed a scoring bug, reviewed it, merged it, and production still showed the old numbers. Derived data is a cache that goes stale, and it must be recomputed.","2026-07-08T21:43:55.000Z","\u002Fimages\u002Fblog\u002Fderived-state-recompute-hero.jpg",[1163,1196,1197],"deployment","idempotency",{"path":1199,"title":1200,"description":1201,"date":1202,"author":1203,"image":1204,"readingMinutes":217,"category":1159,"project":1134,"tags":1134,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fdockerising-nestjs-nuxt-monorepo-with-pnpm","Dockerising a NestJS and Nuxt Monorepo with pnpm","Dockerising a NestJS and Nuxt monorepo with pnpm: separate multi stage Dockerfiles for development and production, one Compose file, reproducible environments.","2026-02-09T09:00:00.000Z","Ogochukwu Okpala","\u002Fimages\u002Fblog\u002Fdocker-monorepo-hero.png",{"path":1206,"title":1207,"description":1208,"date":1209,"author":6,"image":1134,"readingMinutes":222,"category":1159,"project":1160,"tags":1210,"draft":1127,"series":1165,"seriesOrder":1211},"\u002Fblog\u002Ffifty-posts-and-an-empty-robots-txt","Fifty Posts and an Empty robots.txt","Our site scored 100 for SEO and nobody could find it. The audit that started a series on making a site findable, and on what measuring visitors costs them.","2026-08-21T14:30:00.000Z",[1162,1163,1153],0,{"path":1213,"title":1214,"description":1215,"date":1216,"author":6,"image":1217,"readingMinutes":108,"category":1148,"project":1149,"tags":1218,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Ffrom-convention-to-plugin","From Convention to Plugin","A five step procedure for webhook signature checks, easy to forget and silent when you did, became one Fastify plugin. The safe path is now impossible to skip.","2026-04-17T08:26:12.000Z","\u002Fimages\u002Fblog\u002Ffrom-convention-to-plugin-hero.jpg",[1153,1219,1220],"fastify","security",{"path":1222,"title":1223,"description":1224,"date":1225,"author":6,"image":1226,"readingMinutes":132,"category":1159,"project":1149,"tags":1227,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fintegrate-against-the-trunk","Integrate Against the Trunk, Not Your Copy of It","A rebase onto a stale local main succeeds, looks resolved, and leaves the pull request conflicting. Everything on your machine is a photograph of the trunk.","2026-07-09T09:22:00.000Z","\u002Fimages\u002Fblog\u002Fintegrate-against-the-trunk-hero.jpg",[1151,1152,1163],{"path":1229,"title":1230,"description":1231,"date":1232,"author":6,"image":1233,"readingMinutes":108,"category":1148,"project":1149,"tags":1234,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Flandmines","Landmines","Most CLAUDE.md files grow because documenting a convention feels like progress. Ours holds landmines only: facts the code cannot tell you, costly to step on.","2026-04-17T10:15:06.000Z","\u002Fimages\u002Fblog\u002Flandmines-hero.jpg",[1153,1235,1236],"documentation","ai-agents",{"path":1238,"title":1239,"description":1240,"date":1241,"author":6,"image":1242,"readingMinutes":217,"category":1159,"project":1149,"tags":1243,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fnever-break-the-build","Never Break the Build","If the software worked five minutes ago, only five minutes of change can be to blame. What a green trunk buys, who pays for it, and a check that could not fail.","2026-07-09T09:54:00.000Z","\u002Fimages\u002Fblog\u002Fnever-break-the-build-hero.jpg",[1152,1163,1181],{"path":1245,"title":1246,"description":1247,"date":1248,"author":6,"image":1134,"readingMinutes":222,"category":1159,"project":1160,"tags":1249,"draft":1127,"series":1165,"seriesOrder":91},"\u002Fblog\u002Fone-address-per-page","One Address per Page","Every page on our site answered with a redirect before it answered with a page. How we made the build emit one address, declare it, and check it live.","2026-08-22T18:30:00.000Z",[1162,1163,1164,1250],"netlify",{"path":1252,"title":1253,"description":1254,"date":1255,"author":6,"image":1256,"readingMinutes":108,"category":1124,"project":1257,"tags":1258,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fone-command-three-policies","One Command, Three Policies, Zero Duplication","Preflight, cut and ship each worked alone before one command composed them. Why the composition layer is forty lines, and how the scrollback became the record.","2026-07-21T17:20:00.000Z","\u002Fimages\u002Fblog\u002Fone-command-three-policies-hero.jpg","The EkoHacks CLI",[1259,1260,1261,1262],"composition","cli-design","narration","encoding-the-release",{"path":1131,"title":5,"description":1126,"date":1125,"author":6,"image":1129,"readingMinutes":222,"category":1124,"project":1132,"tags":1264,"draft":1127,"series":1134,"seriesOrder":1134},[1137,1138,1139],{"path":1266,"title":1267,"description":1268,"date":1269,"author":6,"image":1270,"readingMinutes":217,"category":1159,"project":1149,"tags":1271,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fready-to-ship-not-ready-to-release","Ready to Ship, Not Ready to Release","Most teams hide a delay between saying done and being able to ship. Being ready to release at any moment, and why our deploy ships the commit that was tested.","2026-07-09T10:02:00.000Z","\u002Fimages\u002Fblog\u002Fready-to-ship-hero.jpg",[1152,1196,1163],{"path":1273,"title":1274,"description":1275,"date":1276,"author":6,"image":1277,"readingMinutes":217,"category":1148,"project":1149,"tags":1278,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Frebase-or-merge-is-the-wrong-argument","Rebase or Merge Is the Wrong Argument","Both commands reconcile the same commits and hit the same conflicts. What differs is when you resolve them. The loud argument hides a quiet one: long branches.","2026-07-09T09:30:00.000Z","\u002Fimages\u002Fblog\u002Frebase-or-merge-hero.jpg",[1151,1152,1153],{"path":1280,"title":1281,"description":1282,"date":1283,"author":6,"image":1284,"readingMinutes":98,"category":1124,"project":1149,"tags":1285,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Freconstructing-the-past","Reconstructing the Past","Connect a repository with a year of history and a trend curve reaches back months. How a system shows a past it never saw, recomputed from one source of truth.","2026-07-07T21:26:35.000Z","\u002Fimages\u002Fblog\u002Freconstructing-the-past-hero.jpg",[1137,1286,1287],"data","onboarding",{"path":1289,"title":1290,"description":1291,"date":1292,"author":6,"image":1134,"readingMinutes":217,"category":1179,"project":1257,"tags":1293,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fretiring-a-board","Retiring a Board: User Testing a CLI Before You Ship It","An afternoon of user testing against a real Linear board, and the four findings a green test suite could never have written.","2026-08-01T10:20:00.000Z",[1294,1138,1260,1295],"user-testing","linear",{"path":1297,"title":1298,"description":1299,"date":1300,"author":6,"image":1301,"readingMinutes":132,"category":1179,"project":1149,"tags":1302,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fretrofitting-testing-without-mocks","Retrofitting Testing Without Mocks","The server had 37 vi.mock calls and no test that touched the database. Five steps to remove every mock with Nullables: real logic, real data, sociable tests.","2026-04-17T12:30:37.000Z","\u002Fimages\u002Fblog\u002Fretrofitting-without-mocks-hero.jpg",[1181,1138,1303],"mocks",{"path":1305,"title":1306,"description":1307,"date":1308,"author":6,"image":1309,"readingMinutes":108,"category":1159,"project":1257,"tags":1310,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Frun-it-by-hand-until-it-is-boring","Run It by Hand Until It Is Boring","Releasing EkoLite was a document before it was a command, and stayed one until running it by hand had nothing left to teach us. Why we automate operations last.","2026-07-21T17:00:00.000Z","\u002Fimages\u002Fblog\u002Frun-it-by-hand-hero.jpg",[1311,1312,1313,1262],"automation","releasing","process",{"path":1315,"title":1316,"description":1317,"date":1283,"author":6,"image":1318,"readingMinutes":98,"category":1159,"project":1149,"tags":1319,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fsafe-to-run-twice","Safe to Run Twice","Connect the same repository twice, or let a webhook redeliver an event. Idempotency in two halves: writes through a natural key, side effects behind a ledger.","\u002Fimages\u002Fblog\u002Fsafe-to-run-twice-hero.jpg",[1163,1197,1320],"webhooks",{"path":1322,"title":1323,"description":1324,"date":1325,"author":6,"image":1134,"readingMinutes":217,"category":1159,"project":1149,"tags":1326,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fsource-or-execute","Source or Execute","Our dojo laptops are provisioned by one bash script of nearly twelve hundred lines. Splitting it into modules is two decisions, not one, and we chose a hybrid.","2026-08-01T09:00:00.000Z",[1327,1328,1259,1163],"shell","provisioning",{"path":1330,"title":1331,"description":1332,"date":1134,"author":1333,"image":1334,"readingMinutes":66,"category":1124,"project":1335,"tags":1134,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fstage-then-transform-why-your-crawler-should-never-touch-production-tables","Stage, Then Transform: Crawlers Stay Out of Production","Where data from an external source lands first decides whether the pipeline still works in six months. The staging pattern, shown with a crawler we build now.","EkoHacks","\u002Fimages\u002Fblog\u002Fstage-then-transform-hero.jpg","Propi",{"path":1337,"title":1338,"description":1339,"date":1340,"author":6,"image":1134,"readingMinutes":222,"category":1179,"project":1160,"tags":1341,"draft":1127,"series":1165,"seriesOrder":132},"\u002Fblog\u002Ftelling-the-machine-what-the-page-is","Telling the Machine What the Page Is","Structured data on every post, and a test that runs after each build and fails it when a page lacks what a crawler needs. First run: forty nine problems.","2026-08-22T23:30:00.000Z",[1162,1181,1164],{"path":1343,"title":1344,"description":1345,"date":1346,"author":6,"image":1347,"readingMinutes":91,"category":1179,"project":1134,"tags":1134,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Ftest-driven-development-is-not-about-tests","Test Driven Development Is Not About Tests","TDD is widely misunderstood. It is not a testing strategy. It is a design tool that produces simpler, more focused code by making you think before you type.","2026-02-01T09:00:00.000Z","\u002Fimages\u002Fblog\u002Ftdd-not-about-tests-hero.jpg",{"path":1349,"title":1350,"description":1351,"date":1352,"author":6,"image":1353,"readingMinutes":132,"category":1179,"project":1257,"tags":1354,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Ftesting-a-release-without-releasing","Testing a Release Without Releasing","How to test watch CI until green, then merge, hundreds of times a day with no CI in sight. Nullables, output trackers, and a fake that copies GitHub shapes.","2026-07-21T17:10:00.000Z","\u002Fimages\u002Fblog\u002Ftesting-a-release-without-releasing-hero.jpg",[1138,1355,1356,1262],"testing-without-mocks","james-shore",{"path":1358,"title":1359,"description":1360,"date":1361,"author":6,"image":1134,"readingMinutes":217,"category":1179,"project":1149,"tags":1362,"draft":1127,"series":1364,"seriesOrder":66},"\u002Fblog\u002Fthe-best-coverage-number-in-the-room","The Best Coverage Number in the Room","Same commit, same spec, same test count. The mocked suite ran 5.6 times faster, covered 3.5 fewer points of real code, and posted the best branch coverage.","2026-08-27T12:00:00.000Z",[1181,1138,1303,1363],"coverage","What Mocks Cost",{"path":1366,"title":1367,"description":1368,"date":1369,"author":6,"image":1370,"readingMinutes":132,"category":1124,"project":1132,"tags":1371,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-bug-that-resolved-successfully","The Bug That Resolved Successfully","A bug that threw no error and dropped every document because the client guessed a collection from a name. The fix was one honest field on the ready message.","2026-07-05T10:16:16.000Z","\u002Fimages\u002Fblog\u002Fbug-resolved-successfully-hero.jpg",[1372,1373,1181,1374],"protocol","pubsub","tdd",{"path":1376,"title":1377,"description":1378,"date":1379,"author":6,"image":1380,"readingMinutes":217,"category":1179,"project":1132,"tags":1381,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-clock-that-learned-to-walk","The Clock That Learned to Walk","A stub clock that teleported to the end of the window instead of passing through time, so a timer set inside another never fired. A real clock model fixed it.","2026-07-07T22:44:42.000Z","\u002Fimages\u002Fblog\u002Fthe-clock-that-learned-to-walk-hero.jpg",[1138,1181,1382],"refactoring",{"path":1384,"title":1385,"description":1386,"date":1387,"author":6,"image":1388,"readingMinutes":132,"category":1148,"project":1149,"tags":1389,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-conflict-nobody-wrote","The Conflict Nobody Wrote","A pull request conflicted in a file neither author had typed into. A generated document recorded test line numbers, both branches shifted them, git merges text.","2026-07-09T09:14:00.000Z","\u002Fimages\u002Fblog\u002Fthe-conflict-nobody-wrote-hero.jpg",[1151,1152,1153],{"path":1391,"title":1392,"description":1393,"date":1394,"author":6,"image":1395,"readingMinutes":228,"category":1159,"project":1149,"tags":1396,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-container-that-wasnt-there","The Container That Wasn't There","Production served HTML where the browser asked for JavaScript, and nothing in our code had changed. A week debugging a platform we cannot see inside.","2026-07-17T14:30:00.000Z","\u002Fimages\u002Fblog\u002Fcontainer-that-wasnt-there-hero.jpg",[1163,1397,1398,1399],"debugging","european-tech","community",{"path":1401,"title":1402,"description":1403,"date":1404,"author":6,"image":1405,"readingMinutes":217,"category":1124,"project":1132,"tags":1406,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-design-we-never-drew","The Design We Never Drew","How the upload path in EkoLite arrived rather than being drawn, and the two habits, test first and integrate always, that turn an emerging shape into a design.","2026-07-20T10:00:00.000Z","\u002Fimages\u002Fblog\u002Fthe-design-we-never-drew-hero.jpg",[1137,1374,1407],"continuous integration",{"path":1409,"title":1410,"description":1411,"date":1412,"author":6,"image":1413,"readingMinutes":108,"category":1148,"project":1134,"tags":1134,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-dojo-way-deliberate-practice-for-software-developers","The Dojo Way: Deliberate Practice for Software Developers","Most developers learn on the job, and the job rarely teaches the fundamentals. The Dojo borrows from martial arts to make a space for deliberate practice.","2026-01-22T09:00:00.000Z","\u002Fimages\u002Fblog\u002Fthe-dojo-way-hero.jpg",{"path":1415,"title":1416,"description":1417,"date":1418,"author":6,"image":1419,"readingMinutes":222,"category":1148,"project":1149,"tags":1420,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-done-column-is-a-syllabus","The Done Column Is a Syllabus","We asked Linear for every story our team has ever finished, all 187 of them, and read the column end to end. It turned out to be the course we teach.","2026-07-31T09:00:00.000Z","\u002Fimages\u002Fblog\u002Fdone-column-syllabus-hero.jpg",[1421,1422,1423,1295],"graphql","stories","xp",{"path":1425,"title":1426,"description":1427,"date":1428,"author":6,"image":1429,"readingMinutes":132,"category":1179,"project":1257,"tags":1430,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-failing-test-is-the-review","The Failing Test Is the Review","Every behaviour in the CLI landed as two commits: a red test, then the code that makes it green. Reviewing intent before implementation, and why red never bent.","2026-07-21T17:05:00.000Z","\u002Fimages\u002Fblog\u002Fthe-failing-test-is-the-review-hero.jpg",[1374,1431,1432,1262],"red-first","code-review",{"path":1434,"title":1435,"description":1436,"date":1437,"author":6,"image":1438,"readingMinutes":132,"category":1159,"project":1257,"tags":1439,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-first-real-run-said-no","The First Real Run Said No","The tool's first real outing ended with FAIL and a stopped rail, and we count it as a success. A naive sounding question then uncovered a quiet failure mode.","2026-07-21T17:25:00.000Z","\u002Fimages\u002Fblog\u002Fthe-first-real-run-said-no-hero.jpg",[1312,1440,1151,1262],"preflight",{"path":1442,"title":1443,"description":1444,"date":1445,"author":6,"image":1446,"readingMinutes":132,"category":1159,"project":1132,"tags":1447,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-five-second-goodbye","The Five Second Goodbye","A shutdown that arms its own deadline so a hung close cannot strand the process, with the policy lifted out of the boot shell so every decision can be tested.","2026-07-05T12:03:00.000Z","\u002Fimages\u002Fblog\u002Fthe-five-second-goodbye-hero.jpg",[1448,1138,1181],"shutdown",{"path":1450,"title":1451,"description":1452,"date":1453,"author":6,"image":1454,"readingMinutes":217,"category":1159,"project":1132,"tags":1455,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-framework-in-the-description-field","The Framework in the Description Field","Our package called itself a framework, but it could not be installed. The fix was to stop trusting the build and become the stranger who installs the tarball.","2026-07-08T17:28:39.000Z","\u002Fimages\u002Fblog\u002Fframework-description-field-hero.jpg",[1456,1181,1153],"packaging",{"path":1458,"title":1459,"description":1460,"date":1461,"author":6,"image":1462,"readingMinutes":108,"category":1124,"project":1257,"tags":1463,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-gate-always-asks","The Gate Always Asks","A release automates things you cannot take back, so which of them may a machine do without asking a human? Pauses, and a yes flag that opens no door.","2026-07-21T17:15:00.000Z","\u002Fimages\u002Fblog\u002Fthe-gate-always-asks-hero.jpg",[1311,1464,1137,1262],"human-in-the-loop",{"path":1466,"title":1467,"description":1468,"date":1469,"author":6,"image":1470,"readingMinutes":217,"category":1159,"project":1149,"tags":1471,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-gate-went-red-and-it-was-right","The Gate Went Red, and It Was Right","We added the missing check on our API specification and it failed on its first run, because the file was never a function of the source. A clean machine saw it.","2026-07-09T10:10:00.000Z","\u002Fimages\u002Fblog\u002Fgate-went-red-hero.jpg",[1152,1163,1153],{"path":1473,"title":1474,"description":1475,"date":1476,"author":6,"image":1477,"readingMinutes":217,"category":1159,"project":1132,"tags":1478,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-knock-and-the-axe","The Knock and the Axe","SIGTERM is a request your process can hear and SIGKILL is removal it never sees, and the fixed window between them is exactly where graceful shutdown lives.","2026-07-20T12:00:00.000Z","\u002Fimages\u002Fblog\u002Fthe-knock-and-the-axe-hero.jpg",[1448,1163,1479],"signals",{"path":1481,"title":1482,"description":1483,"date":1484,"author":6,"image":1485,"readingMinutes":228,"category":1148,"project":1132,"tags":1486,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-line-nothing-could-see","The Line Nothing Could See","Reviewing the reasoning under a refactor, not only the diff. Ask of every line what can observe it, and back each review claim with a test the author can run.","2026-07-07T22:43:00.000Z","\u002Fimages\u002Fblog\u002Fthe-line-nothing-could-see-hero.jpg",[1432,1382,1487,1181],"teaching",{"path":1489,"title":1490,"description":1491,"date":1492,"author":6,"image":1493,"readingMinutes":217,"category":1124,"project":1132,"tags":1494,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-long-way-round","The Long Way Round","The count a method computes reaches the screen not through its return value but by being written into a collection a client subscribes to, EkoLite's channel.","2026-07-20T11:05:00.000Z","\u002Fimages\u002Fblog\u002Fthe-long-way-round-hero.jpg",[1137,1373,1138],{"path":1496,"title":1497,"description":1498,"date":1499,"author":6,"image":1134,"readingMinutes":222,"category":1159,"project":1160,"tags":1500,"draft":1127,"series":1165,"seriesOrder":66},"\u002Fblog\u002Fthe-page-that-existed-only-when-someone-linked-to-it","The Page That Existed Only When Someone Linked to It","Our blog vanished in production while passing every local check. How we found the cause, fixed it twice, and how the fix gave every page a twin.","2026-08-22T16:00:00.000Z",[1162,1163,1164],{"path":1502,"title":1503,"description":1504,"date":1505,"author":6,"image":1506,"readingMinutes":228,"category":1159,"project":1149,"tags":1507,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-previews-that-served-production","The Previews That Served Production","Two weeks after the container that was not there, the same impossible error came back. The orphans were our own pull request previews. One diagnosis was wrong.","2026-07-31T17:00:00.000Z","\u002Fimages\u002Fblog\u002Fpreviews-served-production-hero.jpg",[1163,1397,1398,1399],{"path":1509,"title":1510,"description":1511,"date":1512,"author":6,"image":1513,"readingMinutes":108,"category":1148,"project":1257,"tags":1514,"draft":94,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-release-is-the-acceptance-test","The Release Is the Acceptance Test","Not a green suite, not a good demo: a real version of a real package, live on npm, shipped by the tool. What red first tests proved, and what only reality did.","2026-07-21T17:35:00.000Z","\u002Fimages\u002Fblog\u002Frelease-acceptance-test-hero.jpg",[1312,1515,1516,1262],"dogfooding","acceptance-testing",{"path":1518,"title":1519,"description":1520,"date":1521,"author":6,"image":1522,"readingMinutes":222,"category":1179,"project":1132,"tags":1523,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-script-that-never-ran","The Script That Never Ran","Joining two abilities EkoLite already had, a method that runs and a runner that shells out, and proving the join with a nulled runner before any script exists.","2026-07-20T11:00:00.000Z","\u002Fimages\u002Fblog\u002Fthe-script-that-never-ran-hero.jpg",[1181,1138,1524],"scriptrunner",{"path":1526,"title":1527,"description":1528,"date":1529,"author":6,"image":1134,"readingMinutes":228,"category":1159,"project":1160,"tags":1530,"draft":1127,"series":1165,"seriesOrder":217},"\u002Fblog\u002Fthe-small-things-the-crawler-notices","The Small Things the Crawler Notices","Speed is the part of findability you can measure on a laptop. Fonts and images we shipped without looking, an error page we did not have, and the numbers after.","2026-08-23T10:00:00.000Z",[1162,1163,1531],"performance",{"path":1533,"title":1534,"description":1535,"date":1536,"author":6,"image":1537,"readingMinutes":222,"category":1179,"project":1132,"tags":1538,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-test-that-could-not-fail","The Test That Could Not Fail","A green test that stayed green when we deleted the behaviour it was named after, and the single blunt question that exposed it.","2026-07-20T09:00:00.000Z","\u002Fimages\u002Fblog\u002Ftest-that-could-not-fail-hero.jpg",[1181,1138,1182],{"path":1540,"title":1541,"description":1542,"date":1543,"author":1333,"image":1544,"readingMinutes":217,"category":1148,"project":1545,"tags":1546,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-website-that-told-the-same-story-twice","The Website That Told the Same Story Twice","Our home and story pages felt like one story across two screens. Rather than argue by taste, we modelled our words as data and asked a database one question.","2026-06-06","\u002Fimages\u002Fblog\u002Fwebsite-same-story-twice-hero.jpg","The Website",[1153,1547,1286,1487],"content",{"path":1549,"title":1550,"description":1551,"date":1369,"author":6,"image":1552,"readingMinutes":132,"category":1179,"project":1132,"tags":1553,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-words-we-work-in","The Words We Work In","The vocabulary we test with, Nullable, embedded stub, stub object, output tracking, each grounded in real code so a review points at a line, never at taste.","\u002Fimages\u002Fblog\u002Fthe-words-we-work-in-hero.jpg",[1138,1181,1153,1487],{"path":1555,"title":1556,"description":1557,"date":1543,"author":1333,"image":1558,"readingMinutes":108,"category":1148,"project":1545,"tags":1559,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fthe-workflow-is-the-lesson","The Workflow Is the Lesson","We are moving our content out of a cloud CMS and into git. Why a school that teaches a keyboard first way of working should practise it in the open, and how.","\u002Fimages\u002Fblog\u002Fworkflow-lesson-hero.png",[1560,1151,1487,1561],"workflow","accessibility",{"path":1563,"title":1564,"description":1565,"date":1566,"author":6,"image":1134,"readingMinutes":217,"category":1179,"project":1149,"tags":1567,"draft":1127,"series":1364,"seriesOrder":91},"\u002Fblog\u002Ftwenty-six-more-tests-four-fewer-behaviours","Twenty Six More Tests, Four Fewer Behaviours","Removing the mocks grew the suite from 44 tests to 70 and quietly deleted four behaviours, every one of them a failure path. Test count is not coverage.","2026-08-28T09:00:00.000Z",[1181,1138,1303,1363],{"path":1569,"title":1570,"description":1571,"date":1572,"author":6,"image":1573,"readingMinutes":222,"category":1159,"project":1149,"tags":1574,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Ftwo-hands-on-one-lever","Two Hands on One Lever","Our deploy failed with a deploy already in progress while the commit it wanted to ship was going live. Anatomy of a benign collision and a trigger safe to lose.","2026-07-23T09:00:00.000Z","\u002Fimages\u002Fblog\u002Ftwo-hands-on-one-lever-hero.jpg",[1163,1197,1575],"observability",{"path":1577,"title":1578,"description":1579,"date":1580,"author":6,"image":1134,"readingMinutes":222,"category":1179,"project":1149,"tags":1581,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Ftwo-hundred-and-fourteen-undecided","Two Hundred and Fourteen Undecided","An accessibility scanner found three faults on the dojo, we fixed them, and the next run came back clean. The clean run was the dangerous one.","2026-08-22T12:00:00.000Z",[1561,1181,1137,1153],{"path":1583,"title":1584,"description":1585,"date":1586,"author":6,"image":1587,"readingMinutes":98,"category":1124,"project":1149,"tags":1588,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Ftwo-validators-one-gate","Two Validators, One Gate","Validating one request body twice, with a Fastify schema and again with Zod, is not double safety. The second gate is unreachable. One validator; Zod for types.","2026-07-07T22:06:46.000Z","\u002Fimages\u002Fblog\u002Ftwo-validators-one-gate-hero.jpg",[1137,1589,1590],"validation","typescript",{"path":1592,"title":1593,"description":1594,"date":1595,"author":6,"image":1596,"readingMinutes":217,"category":1159,"project":1149,"tags":1597,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fwe-are-all-doing-asynchronous-integration","We Are All Doing Asynchronous Integration","A continuous integration server is not continuous integration. The forge tests your work after you have moved on. Our build takes three minutes; no excuse.","2026-07-09T09:46:00.000Z","\u002Fimages\u002Fblog\u002Fasynchronous-integration-hero.jpg",[1152,1163,1196],{"path":1599,"title":1600,"description":1601,"date":1602,"author":6,"image":1134,"readingMinutes":222,"category":1159,"project":1160,"tags":1603,"draft":1127,"series":1165,"seriesOrder":222},"\u002Fblog\u002Fwe-promised-not-to-watch-then-we-needed-to-see","We Promised Not to Watch. Then We Needed to See.","Our privacy policy said no analytics, and it was true. Adding a page counter meant reopening that promise in public: what we chose, what we refused, one commit.","2026-08-24T10:00:00.000Z",[1172,1163,1604],"analytics",{"path":1606,"title":1607,"description":1608,"date":1609,"author":6,"image":1610,"readingMinutes":217,"category":1159,"project":1257,"tags":1611,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fwhat-one-real-release-taught-us","What One Real Release Taught Us in an Afternoon","Two crashes and one near miss within minutes of touching the real GitHub, because we had refused to fake it. The race we never met, the merge that never came.","2026-07-21T17:30:00.000Z","\u002Fimages\u002Fblog\u002Fone-real-release-hero.jpg",[1312,1612,1138,1262],"failure-modes",{"path":1614,"title":1615,"description":1616,"date":1617,"author":6,"image":1134,"readingMinutes":217,"category":1159,"project":1160,"tags":1618,"draft":1127,"series":1165,"seriesOrder":108},"\u002Fblog\u002Fwhat-the-link-looks-like-before-anyone-clicks","What the Link Looks Like Before Anyone Clicks","A link to any page on our site showed up as a bare rectangle of text. The share image is part of the page, and the build now puts one on every route.","2026-08-22T22:00:00.000Z",[1162,1163,1164],{"path":1620,"title":1621,"description":1622,"date":1623,"author":6,"image":1134,"readingMinutes":217,"category":1179,"project":1149,"tags":1624,"draft":1127,"series":1364,"seriesOrder":98},"\u002Fblog\u002Fwhat-the-nullable-gave-back","What the Nullable Gave Back","One file, seven behaviours held fixed, the database swapped for a Nullable: about 180 times less time inside the tests, and coverage flat to two decimals.","2026-08-29T09:00:00.000Z",[1181,1138,1303,1363],{"path":1626,"title":1627,"description":1628,"date":1629,"author":6,"image":1134,"readingMinutes":222,"category":1159,"project":1160,"tags":1630,"draft":1127,"series":1165,"seriesOrder":228},"\u002Fblog\u002Fwhat-we-count-and-what-we-refuse-to-know","What We Count, and What We Refuse to Know","Every system that holds anything about a visitor, in one table in the privacy policy. Writing it found a form that no longer existed and one that wrote twice.","2026-08-23T14:00:00.000Z",[1172,1163,1604],{"path":1632,"title":1633,"description":1634,"date":1635,"author":6,"image":1636,"readingMinutes":108,"category":1124,"project":1134,"tags":1134,"draft":1127,"series":1134,"seriesOrder":1134},"\u002Fblog\u002Fwhy-good-software-starts-with-the-right-questions","Why Good Software Starts with the Right Questions","Before writing a line of code, the most impactful thing a team can do is ask better questions. Discovery is not a phase to rush. It is the foundation.","2026-01-15T09:00:00.000Z","\u002Fimages\u002Fblog\u002Fright-questions-hero.jpg",1787861096091]