Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/BRANCHING_STRATEGY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
file_type: documentation
title: Org-wide Git Branching Strategy
description: Canonical branch naming, protection, merge discipline, and automation rules for LightSpeedWP repositories.
last_updated: '2026-06-08'
last_updated: '2026-06-09'
owners:
- LightSpeed Team
version: v1.4
version: v1.5
status: active
stability: stable
domain: governance
Expand Down Expand Up @@ -149,6 +149,7 @@ hotfix/ga4-purchase-duplicate
- If the current branch belongs to a different issue, PR, or task, create a new branch from `develop` before making changes.
- Do not reuse in-flight branches for unrelated work, even when the working tree is already open.
- If unrelated local changes are present, use a clean worktree rather than mixing scopes.
- Temporary audit replay branches created for PR merge prep may use the form `pr-<number>-audit` when they need to keep a live PR attached to a historical review branch.

Use a single regex in a workflow to enforce naming discipline:

Expand All @@ -172,6 +173,8 @@ jobs:
BRANCH="${{ github.head_ref }}"
# Allow dependabot/renovate
if [[ "$BRANCH" =~ ^(dependabot|renovate)/ ]]; then exit 0; fi
# Allow temporary audit replay branches used for PR merge prep
if [[ "$BRANCH" =~ ^pr-[0-9]+-audit$ ]]; then exit 0; fi
if [[ ! "$BRANCH" =~ ^(feat|fix|hotfix|release|refactor|chore|docs|test|perf|ci|build|deps|security|revert|research|design|a11y|ux|i18n|ops|proto|ds|api|schema|telemetry|content|seo|config|migrate|qa|uat)/[a-zA-Z0-9._-]+$ ]]; then
Comment thread
krugazul marked this conversation as resolved.
echo "❌ Branch '$BRANCH' must match the required pattern."
exit 1
Expand Down
32 changes: 32 additions & 0 deletions scripts/validation/__tests__/validate-branch-name.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* @jest-environment jsdom
*/

const { spawnSync } = require("child_process");
const path = require("path");
Comment thread
krugazul marked this conversation as resolved.

const scriptPath = path.join(__dirname, "../validate-branch-name.js");

function runValidator(branchName) {
return spawnSync(process.execPath, [scriptPath, "--branch", branchName], {
encoding: "utf8",
});
Comment thread
krugazul marked this conversation as resolved.
}

describe("Branch name validation", () => {
it("accepts temporary audit replay branches", () => {
const result = runValidator("pr-895-audit");

expect(result.status).toBe(0);
expect(result.stdout).toContain(
"matches the repository branching strategy",
);
});

it("rejects malformed branch names", () => {
const result = runValidator("audit-branch");

expect(result.status).toBe(1);
expect(result.stderr).toContain("does not follow the required format");
});
});
3 changes: 3 additions & 0 deletions scripts/validation/validate-branch-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const ALLOWED_PREFIXES = [
];

const BOT_PREFIXES = /^(dependabot|renovate)\//;
const AUDIT_BRANCH_PATTERN = /^pr-\d+-audit$/;
const PROTECTED_BRANCHES = new Set(["main", "develop"]);
const BRANCH_PATTERN = new RegExp(
`^(${ALLOWED_PREFIXES.join("|")})/[a-zA-Z0-9._-]+$`,
Expand Down Expand Up @@ -90,6 +91,7 @@ function isAllowed(branchName) {
return (
PROTECTED_BRANCHES.has(branchName) ||
BOT_PREFIXES.test(branchName) ||
AUDIT_BRANCH_PATTERN.test(branchName) ||
BRANCH_PATTERN.test(branchName)
);
}
Expand All @@ -100,6 +102,7 @@ function printFailure(branchName) {
"Expected: {prefix}/{branch-slug} (see docs/BRANCHING_STRATEGY.md)",
);
console.error(`Allowed prefixes: ${ALLOWED_PREFIXES.join(", ")}`);
console.error("Audit replay branches: pr-<number>-audit");
console.error(
"Examples: fix/frontmatter-validation, docs/canonical-configs-guide, ops/branch-governance-guardrails",
);
Expand Down
14 changes: 0 additions & 14 deletions website/src/components/WapuuHero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,3 @@ const src = WAPUU_MAP[page] ?? FALLBACK;
class:list={["page-hero-wapuu", className]}
/>

Comment thread
krugazul marked this conversation as resolved.
<style>
.page-hero-wapuu {
height: clamp(140px, 16vw, 230px);
width: auto;
flex: none;
filter: drop-shadow(0 12px 28px rgba(9, 9, 9, 0.18));
}

@media (max-width: 860px) {
.page-hero-wapuu {
display: none;
}
}
</style>
12 changes: 0 additions & 12 deletions website/src/pages/c/[cat].astro
Original file line number Diff line number Diff line change
Expand Up @@ -246,18 +246,6 @@ function typeBadgeClass(type: string): string {
background: var(--bg);
}

Comment thread
krugazul marked this conversation as resolved.
.page-hero-inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 32px;
}

.page-hero-text {
flex: 1;
max-width: 680px;
}

.cat-icon-row {
display: flex;
margin-bottom: 12px;
Expand Down
2 changes: 1 addition & 1 deletion website/src/scripts/search-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function scoreField(field, token, weight) {
let score = weight;
if (field === token) score += weight * 0.75;
if (field.startsWith(token)) score += weight * 0.5;
if (field.includes(` ${token} `)) score += weight * 0.25;
if ((" " + field + " ").includes(" " + token + " ")) score += weight * 0.25;

return score;
}
Expand Down
2 changes: 1 addition & 1 deletion website/src/scripts/search.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env browser */
/* search.js — Search palette controller */

import { rankSearchItems } from "./search-utils.js";
import { rankSearchItems, getSearchTokens } from "./search-utils.js";

const root = document.getElementById("search-palette");
const input = document.getElementById("sp-input");
Expand Down
2 changes: 2 additions & 0 deletions website/src/styles/site-tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/* Surface elevation above --bg */
--panel: #FFFFFF;
--panel-2: #F9FAFB;
--overlay-scrim: rgba(9, 9, 9, 0.55);

/* Hairline border — use this, NOT var(--border) */
--hair: var(--border);
Expand Down Expand Up @@ -47,6 +48,7 @@
color-scheme: dark;
--panel: #16171D;
--panel-2: #1B1C23;
--overlay-scrim: rgba(0, 0, 0, 0.65);
--hair: rgba(255, 255, 255, 0.09);
--overlay-hover: rgba(255, 255, 255, 0.06);

Expand Down
Loading