Skip to content

fix: resolve Makefile merge and centralize .env CRLF handling#119

Open
balasiddarthan22 wants to merge 10 commits into
tinyfish-io:mainfrom
balasiddarthan22:fix/makefile-windows-crlf
Open

fix: resolve Makefile merge and centralize .env CRLF handling#119
balasiddarthan22 wants to merge 10 commits into
tinyfish-io:mainfrom
balasiddarthan22:fix/makefile-windows-crlf

Conversation

@balasiddarthan22

@balasiddarthan22 balasiddarthan22 commented Jun 3, 2026

Copy link
Copy Markdown

Resolves merge conflicts in makefiles/Makefile by centralizing .env value reads with automatic CRLF stripping. All env reads now handle Windows line endings transparently.

Test:

  1. Create a .env file with CRLF line endings on Windows
  2. Run make validate-dev-env — should correctly parse env vars without CRLF corruption
  3. Run make ensure-admin-key — should read CONVEX_SELF_HOSTED_ADMIN_KEY without trailing carriage returns

On Windows, .env files use CRLF line endings. cut -d= -f2- includes
the trailing \r in the extracted value, so CLERK_JWT_ISSUER_DOMAIN
gets stored in Convex as https://example.clerk.accounts.dev\r which
silently breaks authentication with a cryptic JWT error.

Fix: pipe through tr -d '\r' in ensure-admin-key, convex-env, and
convex-push targets.
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds an in-process abort-controller registry and integrates it into dataset runs, exposing an authenticated POST /stop endpoint that triggers dataset-scoped cancellation or forces cleanup for orphaned runs. It threads a per-dataset maxRowCount through populate agents, subagent tools, and workflows, enforces maxRowCount at Convex insertion, and adds create/update APIs and schema support. The frontend receives UI for configuring max rows, a Stop button, and a SideSheet cell-detail view; client APIs now support populate(maxRowCount) and stopPopulation. Makefile .env reads are sanitized to strip CRs.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Frontend
  participant BackendAPI
  participant AbortRegistry
  participant BackgroundRunner
  participant ConvexDB
  User->>Frontend: Click "Stop" for dataset
  Frontend->>BackendAPI: POST /stop { datasetId } (auth)
  BackendAPI->>ConvexDB: verify dataset & ownership
  BackendAPI->>AbortRegistry: abortDataset(datasetId)
  AbortRegistry-->>BackgroundRunner: signal.aborted
  BackgroundRunner->>ConvexDB: finaliseRunAsLive or mark failed
  BackendAPI-->>Frontend: 202 (cancellation requested) / 200 (forced cleanup)
Loading

Possibly related PRs

Suggested reviewers

  • simantak-dabhade
  • manav-tf
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the primary change: a Makefile fix addressing CRLF handling from .env files. It is specific, concise, and clearly reflects the main objective described in the PR.
Description check ✅ Passed The PR description accurately explains the problem (CRLF line endings in .env files on Windows) and the solution (stripping carriage returns via env_value helper in Makefile recipes).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
makefiles/Makefile (1)

37-37: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Apply the same carriage return sanitization to validation.

The validate-dev-env target extracts environment variable values without stripping carriage returns. On Windows systems with CRLF line endings, this causes placeholder detection to fail. For example, if .env contains CLERK_JWT_ISSUER_DOMAIN=https://your-app.clerk.accounts.dev\r, the extracted value won't match the placeholder string, and validation will incorrectly pass, allowing the placeholder value to propagate to downstream services where it will cause authentication failures.

🔧 Proposed fix
-		value="$$(grep "^$$key=" .env | cut -d= -f2-)"; \
+		value="$$(grep "^$$key=" .env | cut -d= -f2- | tr -d '\r')"; \
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@makefiles/Makefile` at line 37, In the validate-dev-env Makefile target the
extracted variable assignment (the shell variable named value) doesn't strip CR
characters, so on Windows CRLF endings the placeholder check can fail; update
the extraction pipeline that sets the shell variable value (the line using grep
"^$key=" and cut -d= -f2-) to also remove carriage returns (e.g., pipe the
result through tr -d '\r' or sed to strip trailing CR) so the placeholder
comparison in validate-dev-env works correctly on CRLF files.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@makefiles/Makefile`:
- Line 37: In the validate-dev-env Makefile target the extracted variable
assignment (the shell variable named value) doesn't strip CR characters, so on
Windows CRLF endings the placeholder check can fail; update the extraction
pipeline that sets the shell variable value (the line using grep "^$key=" and
cut -d= -f2-) to also remove carriage returns (e.g., pipe the result through tr
-d '\r' or sed to strip trailing CR) so the placeholder comparison in
validate-dev-env works correctly on CRLF files.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d336f124-9d94-40f1-9c84-8c229d78cd2a

📥 Commits

Reviewing files that changed from the base of the PR and between c915897 and 7510b06.

📒 Files selected for processing (1)
  • makefiles/Makefile

@simantak-dabhade simantak-dabhade left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this. The diagnosis is right: cut -d= -f2- preserves the trailing \r from CRLF .env files, and that can poison CLERK_JWT_ISSUER_DOMAIN when we push it into Convex.

Can we broaden this before merging? The same parsing pattern is used for other .env values in this Makefile too, including PROD, LOCAL_KEYCHAIN_PORT, and CONVEX_SELF_HOSTED_ADMIN_KEY. Convex auth is where this showed up, but the bug is not Convex-specific. For example, PROD=1\r will not compare equal to "1".

I think the right shape is to centralize .env reads and strip \r everywhere, instead of adding tr -d '\r' to only the affected Convex lines. An inline shell helper inside the recipes would fit the current Makefile style, e.g.:

env_value() {
  grep "^293771=" .env | tail -n1 | cut -d= -f2- | tr -d '\r'
}
prod="29377(env_value PROD)"
admin_key="29377(env_value CONVEX_SELF_HOSTED_ADMIN_KEY)"
issuer="29377(env_value CLERK_JWT_ISSUER_DOMAIN)"

Or use an equivalent Make helper if you prefer. Main request: make all Makefile .env reads CRLF-safe so this does not come back under a different variable.

MMeteorL and others added 8 commits June 6, 2026 19:25
* Add stop population/update feature

Adds a Stop button in Settings that cancels in-flight populate or update runs, preserving all collected rows and transitioning the dataset to 'live'.

Implementation:
- abort-registry.ts: module-level Map<runId, AbortController> shared across the process
- /stop route: looks up the active runId for a dataset, fires AbortController.abort()
- AbortSignal threaded via abortSignal parameter to every agent.generate() call (orchestrator, subagent, refresh agents)
- run_subagent tool re-throws AbortError so cancellation propagates up to the orchestrator
- Update workflow: processRow re-throws AbortError so workers exit early; a post-concurrency check bulk-clears any remaining pending row updateStatus fields
- Background runners detect controller.signal.aborted in catch, set status → 'live', send ready notification with collected row count
- Convex: new clearAllPendingUpdateStatus internal mutation to bulk-reset pending shimmers on stop
- runStats still saved via existing finally block (recorded as stopped with errorMsg "Stopped by user")

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Simplify abort registry and remove dead code

Three refactors to the stop-population implementation:

1. Key abort-registry by datasetId instead of workflowRunId
   Convex's atomic claim already guarantees at most one active run per
   dataset, so datasetId is a valid unique key. This eliminates the
   activeDatasets Map that existed only to bridge datasetId → runId →
   AbortController, and simplifies all call sites (steps already have
   authorizedDatasetId/datasetId in scope).

2. Extract finaliseRunAsLive() helper
   Both background runners had identical ~12-line blocks to handle a
   user stop: query dataset, set status "live", count rows, conditionally
   email. Extracted into a shared helper.

3. Remove dead abort catch in runUpdateWorkflowInBackground
   When a stop fires during an update, processRow re-throws AbortError,
   Promise.allSettled winds down the workers, refreshRowsStep detects
   signal.aborted, clears pending rows, and returns normally. Mastra
   sees a successful step, run.start() returns {status:"success"}, and
   the existing success path handles the live transition. The
   controller.signal.aborted branch in the catch was unreachable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Address CodeRabbit review and fix stuck-run scenarios

Backend fixes:
- finaliseRunAsLive failure: if the live-status mutation fails after a user
  stop, fall back to setting status "failed" so the dataset always leaves
  "building". Previously a failed finalisation returned without touching
  the status, leaving the dataset permanently stuck with no registry entry
  for /stop to act on.
- investigate-tool maxSteps: fix 10 → 25 to match the contract in CLAUDE.md
- enumerateStep abort: thread abortSignal into generateText so a stop
  pressed during enumeration (a ~10-token LLM call) cancels immediately
  rather than waiting for the call to complete. Re-throws AbortError so
  Mastra marks the step failed and the background runner's abort-detection
  fires.

Frontend fixes:
- stopping latch: don't clear stopping in handleStop's finally. Instead,
  a useEffect clears it when dataset.status transitions out of "building"/
  "updating". This keeps the Stop button in "Stopping…"/disabled state
  until Convex confirms the run has actually finished, preventing the
  re-enable flash and duplicate stop requests during the cleanup window.
  Only clears immediately on fetch error (run was never reached).
- backend.ts: extract backendPost<T> helper — 4 functions were duplicating
  the same fetch/auth-header/error-parse boilerplate.
- clearAllPendingUpdateStatus: add scale note about Convex per-mutation
  document limits.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Revert maxSteps change and backendPost refactor

maxSteps in investigate-tool.ts: revert 25 → 10 to match main. The
CodeRabbit comment cited CLAUDE.md describing the extract-tool-pipeline
architecture where subagents use 25 steps — not applicable on main.

backendPost helper: revert to individual fetch functions. The refactor
adds a layer of indirection without making the stop feature safer or
simpler. Code quality cleanups belong in a separate PR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix clearAllPendingUpdateStatus full-dataset scan

Add a compound index by_dataset_update_status (["datasetId",
"updateStatus"]) to datasetRows so the mutation can query only the
pending rows directly rather than scanning the entire dataset table.

Before: collect() all rows for the dataset, filter in TS, patch pending.
After: index query returns only pending rows; no other rows are scanned.

Requires make convex-push to deploy the schema change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix AbortError re-throw regression causing 0-row populate runs

Tighten all three AbortError re-throw guards to check
getSignal(datasetId)?.aborted before propagating. Without this, spurious
network AbortErrors (undici ECONNRESET, dropped SSE streams, SDK-internal
cleanup aborts) were re-thrown as if the user had pressed Stop.

In investigate-tool.ts this caused the orchestrator's agent.generate() to
receive a tool-thrown AbortError and exit early with a graceful empty
result, producing a successful workflow run with 0 rows inserted. The fix
restores the original structured-failure return path for all non-user aborts
so the orchestrator can log the failure and continue with other entities.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix react-hooks/set-state-in-effect lint error on stopping latch

Calling setStopping(false) synchronously inside a useEffect body
triggers the react-hooks/set-state-in-effect rule, blocking the
frontend lint gate.

Remove the effect entirely. The stopping latch only needs to reset
before the *next* populate or update run starts. Both handlePopulate
and handleUpdate are already guarded against running while the dataset
is busy, so they only fire after the status has settled to live/failed.
Adding setStopping(false) at the top of each handler — right before
setPopulating/setUpdating — is both correct and semantically clearer:
"starting a new run discards any leftover stop-latch from the prior one."

While the dataset is non-busy, the Stop button is hidden entirely
(replaced by Update/Clear & Populate), so the stale stopping=true value
is invisible and harmless until those handlers run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix stop-button latch, orphaned-dataset recovery, and TOCTOU race

- Frontend: hoist isDatasetBusy before the loading guard (optional chaining)
  so the useEffect dep array never hits the TDZ during the loading state.
  Add a useEffect + setTimeout to clear the `stopping` latch once Convex
  confirms the dataset has left the busy state, satisfying the
  react-hooks/set-state-in-effect lint rule.

- Backend (/stop): detect orphaned datasets (busy in Convex but no abort
  registry entry) and force-transition them to "failed" so they are never
  permanently stuck after a server restart.

- Backend (TOCTOU): move registerDataset() from inside the background async
  functions to the route handlers, before the void call. This closes the race
  window where a /stop arriving before the background function ran
  registerDataset would incorrectly trigger the orphan path against a live run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix stop cleanup edge cases

* Move stop action to dataset toolbar

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Simantak Dabhade <simantak@mac.local>
Co-authored-by: Simantak Dabhade <67303107+simantak-dabhade@users.noreply.github.com>
Co-authored-by: Simantak Dabhade <67303107+simantak-dabhade@users.noreply.github.com>
* Add cell expand side sheet with sources

Hovering any table cell reveals a Maximize2 icon. Clicking it opens a
slide-in panel showing the column name, type, description, full cell
value with a copy button, and (when available) the row-level sources
the populate agent saved alongside the data.

Changes:
- SideSheet.tsx: new component with backdrop, Escape/Tab trap,
  scroll lock, and slide-in animation. CellDetail sub-component
  shows column metadata, value (with inline "Copied" feedback),
  and sources as clickable external links.
- types.ts: add optional `sources?: string[]` to DatasetRow
- DataRow.tsx: `group` + Maximize2 button on hover per cell;
  `onCellExpand` callback added to DataRowData interface.
- DatasetTable.tsx: accept and forward `onCellExpand` prop.
- page.tsx: cellDetail state, row sources lookup, SideSheet render.
- globals.css: `slide-in` keyframe + `.animate-slide-in` utility.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix lucide-react module-not-found by using inline SVGs

lucide-react is in bun.lock but not installed in the running Docker
container's node_modules. Existing components (ColumnHeader, ColumnIcon,
ThemeToggle) all use inline SVGs — follow the same pattern instead of
adding a runtime dependency.

Replaced: Copy, Check, ExternalLink, X in SideSheet.tsx and
Maximize2 in DataRow.tsx with self-contained SVG components.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix perf regression, simplify state shape, remove dead CSS

Performance: onCellExpand was an inline arrow on <DatasetTable>,
busting the itemData useMemo on every parent render and causing
react-window to re-render all visible rows unnecessarily. Replaced
with a useCallback (handleCellExpand) so the reference is stable.

Simplification: cellDetail state now stores the resolved DatasetColumn
object at click time instead of a columnName string. This eliminates
the render-time columns.find() call and the IIFE pattern in JSX —
the SideSheet children reduce to a plain conditional render.

Cleanup: removed @Keyframes slide-in and .animate-slide-in from
globals.css — those were added for the side-sheet variant and are
unused now that the UI is a centered modal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Address CodeRabbit review: XSS guard, timer cleanup, a11y, lint fixes

- SideSheet: validate source URLs to http/https before rendering as <a>
  to prevent javascript:/data: XSS; invalid URLs fall back to plain text
- SideSheet: store setTimeout ID in a ref and clear on unmount to avoid
  calling setCopied after the component is gone; promote handleCopy to
  useCallback
- SideSheet: add aria-labelledby on dialog + id on heading for screen readers
- SideSheet: use URL string as list key instead of array index
- DataRow: move floorWidth import above IconMaximize2 declaration (import/first)
- DataRow: reveal expand button on keyboard focus-visible, not only on hover

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Simantak Dabhade <67303107+simantak-dabhade@users.noreply.github.com>
* Cap dataset population at 100 rows

* Handle row cap count failures in subagent tool

* Mention row limit sentinel in populate prompt

* Allow custom dataset max rows

* Allow editing dataset max rows

* Address max rows review feedback
Replace scattered cut/tr patterns with a single env_value() shell
function defined inline in each recipe. All .env reads are now
CRLF-safe by default, not just the Convex-specific ones.
@balasiddarthan22 balasiddarthan22 requested a review from a team as a code owner June 6, 2026 13:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/secrets-scanner.yml (1)

1-17: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Process violation: file is managed by Terraform in another repository.

The file header (lines 1-4) explicitly states this workflow is managed by Terraform in the github-control repository and instructs developers to make changes there, not here. Direct edits to this file will be overwritten and bypass the intended governance process.

Move this change to https://github.com/tinyfish-io/github-control as indicated in the header.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/secrets-scanner.yml around lines 1 - 17, This workflow
file is managed by Terraform in the external repo and must not be edited here;
instead, revert any edits to the .github/workflows/secrets-scanner.yml in this
PR and reapply your intended change as a pull request in the github-control
repository where Terraform manages this file; specifically ensure changes to the
"Leaked Secrets Scan" workflow (e.g., the TruffleHog job or the actions/checkout
pin) are made in that repo so they won’t be overwritten by Terraform.
frontend/lib/backend.ts (1)

210-234: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Use the typed backend fetch wrapper instead of duplicating per-endpoint fetch logic

The new populate/stopPopulation additions repeat raw fetch + error parsing instead of using a shared typed wrapper in this module, which increases drift risk and weakens type safety across endpoints.

♻️ Suggested refactor
+async function backendJson<T>(
+  path: string,
+  method: "GET" | "POST",
+  token?: string,
+  body?: unknown,
+): Promise<T> {
+  const res = await fetch(`${BACKEND_URL}${path}`, {
+    method,
+    headers: {
+      "Content-Type": "application/json",
+      ...(token ? { Authorization: `Bearer ${token}` } : {}),
+    },
+    ...(body !== undefined ? { body: JSON.stringify(body) } : {}),
+  });
+
+  if (!res.ok) {
+    const payload = await res.json().catch(() => null);
+    throw new Error(payload?.error || `Backend error (${res.status})`);
+  }
+
+  return res.json() as Promise<T>;
+}
@@
 export async function populate(
@@
 ): Promise<PopulateStartResult> {
-  const res = await fetch(`${BACKEND_URL}/populate`, {
-    method: "POST",
-    headers: {
-      "Content-Type": "application/json",
-      Authorization: `Bearer ${token}`,
-    },
-    body: JSON.stringify({ datasetId, datasetName, description, maxRowCount, columns }),
-  });
-
-  if (!res.ok) {
-    const body = await res.json().catch(() => null);
-    const message = body?.error || `Backend error (${res.status})`;
-    throw new Error(message);
-  }
-
-  return res.json();
+  return backendJson<PopulateStartResult>("/populate", "POST", token, {
+    datasetId,
+    datasetName,
+    description,
+    maxRowCount,
+    columns,
+  });
 }
@@
 export async function stopPopulation(
@@
 ): Promise<{ success: boolean }> {
-  const res = await fetch(`${BACKEND_URL}/stop`, {
-    method: "POST",
-    headers: {
-      "Content-Type": "application/json",
-      Authorization: `Bearer ${token}`,
-    },
-    body: JSON.stringify({ datasetId }),
-  });
-
-  if (!res.ok) {
-    const body = await res.json().catch(() => null);
-    const message = body?.error || `Backend error (${res.status})`;
-    throw new Error(message);
-  }
-
-  return res.json();
+  return backendJson<{ success: boolean }>("/stop", "POST", token, { datasetId });
 }

As per coding guidelines, “Implement typed fetch wrapper in lib/backend.ts for calling the Fastify backend with Bearer token authentication.”

Also applies to: 264-284

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/lib/backend.ts` around lines 210 - 234, The populate function is
using raw fetch/error parsing instead of the module's typed fetch
wrapper—replace the manual fetch in populate with the existing typed wrapper
(the common function used elsewhere in lib/backend.ts for calling the Fastify
backend with Bearer token auth), passing the same POST payload ({ datasetId,
datasetName, description, maxRowCount, columns }) and token so the wrapper
attaches Authorization and handles error parsing/typing; do the same refactor
for stopPopulation so both endpoints use the shared typed wrapper and return the
wrapper's typed response instead of calling fetch directly.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/src/index.ts`:
- Line 319: The registration of the dataset is currently done inside
runScheduledUpdateWorkflowInBackground (registerDataset), creating a TOCTOU
window because the background task is already void-ed; move the
registerDataset(datasetId) call out of runScheduledUpdateWorkflowInBackground
and invoke registerDataset(datasetId) immediately before the code path that
voids the background task (the earlier "void" call that starts the background
workflow) so registration happens synchronously prior to voiding, and remove the
redundant registerDataset call from inside
runScheduledUpdateWorkflowInBackground.

In `@frontend/app/dataset/`[id]/page.tsx:
- Around line 236-241: The quota check incorrectly compares the absolute
maxRowCount to usage.remaining; change it to compute the incremental rows needed
= Math.max(0, maxRowCount - currentRowCount) and validate that against
usage.remaining before calling setMaxRowCountSaveError. Locate the validation
that uses maxRowCount and usage.remaining (and the handler that calls
setMaxRowCountSaveError) and replace the direct comparison with the incremental
calculation so reductions or cases where currentRowCount already exceeds
maxRowCount are allowed.

In `@makefiles/Makefile`:
- Around line 88-93: The Makefile contains unresolved git merge markers that
break parsing; remove the conflict markers (<<<<<<<, =======, >>>>>>>) and keep
the centralized env_value helper implementation and its usages so the recipe
sets admin_key via env_value (admin_key="$$(env_value
CONVEX_SELF_HOSTED_ADMIN_KEY)") and similar calls in the ensure-admin-key,
convex-env, and convex-push recipes; ensure no leftover conflict tokens remain
and that env_value is defined once before those recipes.

In `@README.md`:
- Line 288: Typo in the README: change the string "This awesome team is behing
BigSet! We'd love to have you on board :)" to "This awesome team is behind
BigSet! We'd love to have you on board :)" by updating the literal in the README
(search for the exact quoted phrase to locate it).
- Line 285: The contributor image tag (<img
src="https://contrib.rocks/image?repo=tinyfish-io/bigset" />) lacks an alt
attribute; add a concise, descriptive alt attribute (for example:
alt="Contributors to tinyfish-io/bigset") to the <img> element so screen readers
can describe the image, ensuring the README's contributor image includes that
alt text.

---

Outside diff comments:
In @.github/workflows/secrets-scanner.yml:
- Around line 1-17: This workflow file is managed by Terraform in the external
repo and must not be edited here; instead, revert any edits to the
.github/workflows/secrets-scanner.yml in this PR and reapply your intended
change as a pull request in the github-control repository where Terraform
manages this file; specifically ensure changes to the "Leaked Secrets Scan"
workflow (e.g., the TruffleHog job or the actions/checkout pin) are made in that
repo so they won’t be overwritten by Terraform.

In `@frontend/lib/backend.ts`:
- Around line 210-234: The populate function is using raw fetch/error parsing
instead of the module's typed fetch wrapper—replace the manual fetch in populate
with the existing typed wrapper (the common function used elsewhere in
lib/backend.ts for calling the Fastify backend with Bearer token auth), passing
the same POST payload ({ datasetId, datasetName, description, maxRowCount,
columns }) and token so the wrapper attaches Authorization and handles error
parsing/typing; do the same refactor for stopPopulation so both endpoints use
the shared typed wrapper and return the wrapper's typed response instead of
calling fetch directly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e8b64c19-e6f1-42be-9f82-ee8e31b10e6a

📥 Commits

Reviewing files that changed from the base of the PR and between 7510b06 and 52a47e4.

📒 Files selected for processing (22)
  • .github/workflows/secrets-scanner.yml
  • README.md
  • backend/src/abort-registry.ts
  • backend/src/index.ts
  • backend/src/mastra/agents/populate.ts
  • backend/src/mastra/tools/investigate-tool.ts
  • backend/src/mastra/workflows/populate.ts
  • backend/src/mastra/workflows/update.ts
  • backend/src/pipeline/populate.ts
  • frontend/app/dataset/[id]/page.tsx
  • frontend/app/dataset/new/page.tsx
  • frontend/components/SideSheet.tsx
  • frontend/components/ThemeToggle.tsx
  • frontend/components/table/DataRow.tsx
  • frontend/components/table/DatasetTable.tsx
  • frontend/components/table/types.ts
  • frontend/convex/datasetRows.ts
  • frontend/convex/datasets.ts
  • frontend/convex/schema.ts
  • frontend/lib/analytics.ts
  • frontend/lib/backend.ts
  • makefiles/Makefile

Comment thread backend/src/index.ts
Comment thread frontend/app/dataset/[id]/page.tsx
Comment thread makefiles/Makefile Outdated
Comment thread README.md
Comment thread README.md
@balasiddarthan22

Copy link
Copy Markdown
Author

Thanks for the suggestion! I've replaced the scattered cut/tr patterns with an inline env_value() helper defined in each recipe. All .env reads across validate-dev-env, ensure-admin-key, convex-env, and convex-push now go through it, so CRLF stripping is consistent everywhere.

@paveldudka paveldudka left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pr content doesnt match pr description

@paveldudka paveldudka left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR comments not addressed. Doesn't look like this PR (only) strips carriage returns from .env values in Makefile

Break it down

@balasiddarthan22 balasiddarthan22 force-pushed the fix/makefile-windows-crlf branch from ce4c2cc to 7baad01 Compare June 11, 2026 08:22
@balasiddarthan22 balasiddarthan22 changed the title fix: strip carriage returns from .env values in Makefile fix: resolve Makefile merge and centralize .env CRLF handling Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants