mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-11-18 18:03:47 +00:00
Merge pull request #1253 from msitarzewski/integ/content-batch8
Merge content fixes, batch 8 (#1199–#1203, #1208)
This commit is contained in:
@@ -134,6 +134,12 @@ CREATE TABLE users (
|
||||
CREATE INDEX idx_users_email ON users(email) WHERE deleted_at IS NULL;
|
||||
CREATE INDEX idx_users_created_at ON users(created_at);
|
||||
|
||||
-- Categories must exist before products can reference them
|
||||
CREATE TABLE categories (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
name VARCHAR(255) NOT NULL
|
||||
);
|
||||
|
||||
-- Products table with proper normalization
|
||||
CREATE TABLE products (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
|
||||
@@ -81,19 +81,45 @@ def ingest_bronze(source_path: str, bronze_table: str, source_system: str) -> in
|
||||
return df.count()
|
||||
|
||||
# ── Silver: cleanse, deduplicate, conform ────────────────────────────────────
|
||||
def upsert_silver(bronze_table: str, silver_table: str, pk_cols: list[str]) -> None:
|
||||
source = spark.read.format("delta").load(bronze_table)
|
||||
# Dedup: keep latest record per primary key based on ingestion time
|
||||
def upsert_silver(
|
||||
bronze_table: str, silver_table: str, pk_cols: list[str], version_col: str
|
||||
) -> None:
|
||||
from pyspark.sql.window import Window
|
||||
from pyspark.sql.functions import row_number, desc
|
||||
w = Window.partitionBy(*pk_cols).orderBy(desc("_ingested_at"))
|
||||
from pyspark.sql.functions import row_number, desc, countDistinct, struct
|
||||
from pyspark.sql.types import ByteType, ShortType, IntegerType, LongType
|
||||
|
||||
source = spark.read.format("delta").load(bronze_table)
|
||||
required = set(pk_cols + [version_col, "_ingested_at", "_source_file"])
|
||||
if not pk_cols or not required.issubset(source.columns):
|
||||
raise ValueError("Provide primary keys, a source version, and ingestion metadata")
|
||||
if not isinstance(source.schema[version_col].dataType,
|
||||
(ByteType, ShortType, IntegerType, LongType)):
|
||||
raise ValueError("Source versions must be integers, not arrival timestamps")
|
||||
invalid = col(version_col).isNull()
|
||||
for key in pk_cols:
|
||||
invalid = invalid | col(key).isNull()
|
||||
if source.filter(invalid).limit(1).count():
|
||||
raise ValueError("Primary keys and source versions must not be null")
|
||||
|
||||
# Replays may have different ingestion metadata but must agree on payload.
|
||||
payload_cols = [c for c in source.columns if c not in ("_ingested_at", "_source_file")]
|
||||
conflicts = source.groupBy(*pk_cols, version_col).agg(
|
||||
countDistinct(struct(*[col(c) for c in payload_cols])).alias("_variants")
|
||||
).filter(col("_variants") > 1)
|
||||
if conflicts.limit(1).count():
|
||||
raise ValueError("Conflicting payloads share a primary key and source version")
|
||||
|
||||
# Source versions establish business order; ingestion metadata only breaks replay ties.
|
||||
w = Window.partitionBy(*pk_cols).orderBy(
|
||||
desc(version_col), desc("_ingested_at"), desc("_source_file")
|
||||
)
|
||||
source = source.withColumn("_rank", row_number().over(w)).filter(col("_rank") == 1).drop("_rank")
|
||||
|
||||
if DeltaTable.isDeltaTable(spark, silver_table):
|
||||
target = DeltaTable.forPath(spark, silver_table)
|
||||
merge_condition = " AND ".join([f"target.{c} = source.{c}" for c in pk_cols])
|
||||
target.alias("target").merge(source.alias("source"), merge_condition) \
|
||||
.whenMatchedUpdateAll() \
|
||||
.whenMatchedUpdateAll(condition=f"source.{version_col} > target.{version_col}") \
|
||||
.whenNotMatchedInsertAll() \
|
||||
.execute()
|
||||
else:
|
||||
@@ -125,6 +151,8 @@ def build_gold_daily_revenue(
|
||||
|
||||
`_source_file` must describe the file Spark read, rather than a payload field named `_metadata.file_path`. This open-source Spark example uses [PySpark `input_file_name`](https://spark.apache.org/docs/3.5.6/api/python/reference/pyspark.sql/api/pyspark.sql.functions.input_file_name.html) so source JSON containing `_metadata` cannot replace the physical file URI. Adapt provenance to the runtime you deploy; the [Databricks file metadata API](https://docs.databricks.com/aws/en/ingestion/file-metadata-column) also documents collisions with source columns named `_metadata`.
|
||||
|
||||
Call Silver with a source-owned integer version, for example `upsert_silver(bronze_path, silver_path, ["order_id"], "order_version")`. Versions must increase for each primary key and never reset; an ingestion timestamp or random event ID cannot establish business order. This example reads the complete retained Bronze history, uses flat scalar payload columns and simple column names, and assumes one Silver writer. Include source/tenant identifiers in `pk_cols` when IDs are only unique within that scope. Identical replays are accepted, but different payloads at the same key/version fail before writing; resolve or quarantine those conflicts rather than inventing an ordering. The merge only updates newer versions, so late delivery of an older event cannot roll Silver back. See [Delta Lake merge semantics and deduplication](https://docs.delta.io/delta-update/).
|
||||
|
||||
Run the Gold refresh against a complete Silver snapshot for the requested date window, not a partial event batch. Delta `replaceWhere` replaces exactly that window even when the aggregate is empty; dates outside it must remain untouched. Keep its default predicate constraint check enabled. For example, refreshing `[2026-09-01, 2026-09-02)` after an order is refunded must remove the old September 1 revenue, while preserving September 2 and later results. See [Delta selective overwrite](https://docs.delta.io/delta-batch/#selective-overwrite).
|
||||
|
||||
### dbt Data Quality Contract
|
||||
|
||||
@@ -65,57 +65,81 @@ You are **Frontend Developer**, an expert frontend developer who specializes in
|
||||
|
||||
### Modern React Component Example
|
||||
```tsx
|
||||
// Modern React component with performance optimization
|
||||
import React, { memo, useCallback, useMemo } from 'react';
|
||||
// Renderable cell values and stable IDs keep the example self-contained.
|
||||
import React, { memo } from 'react';
|
||||
import { useVirtualizer } from '@tanstack/react-virtual';
|
||||
|
||||
type Row = { id: string } & Record<string, React.ReactNode>;
|
||||
|
||||
interface Column {
|
||||
key: string;
|
||||
header: string;
|
||||
}
|
||||
|
||||
interface DataTableProps {
|
||||
data: Array<Record<string, any>>;
|
||||
data: Row[];
|
||||
columns: Column[];
|
||||
onRowClick?: (row: any) => void;
|
||||
onRowClick?: (row: Row) => void;
|
||||
}
|
||||
|
||||
export const DataTable = memo<DataTableProps>(({ data, columns, onRowClick }) => {
|
||||
const parentRef = React.useRef<HTMLDivElement>(null);
|
||||
|
||||
const rowVirtualizer = useVirtualizer({
|
||||
count: data.length,
|
||||
getScrollElement: () => parentRef.current,
|
||||
getItemKey: (index) => data[index].id,
|
||||
estimateSize: () => 50,
|
||||
overscan: 5,
|
||||
});
|
||||
|
||||
const handleRowClick = useCallback((row: any) => {
|
||||
onRowClick?.(row);
|
||||
}, [onRowClick]);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={parentRef}
|
||||
className="h-96 overflow-auto"
|
||||
role="table"
|
||||
aria-label="Data table"
|
||||
aria-rowcount={data.length + 1}
|
||||
tabIndex={0}
|
||||
>
|
||||
<div role="row" aria-rowindex={1} className="flex font-bold">
|
||||
{columns.map((column) => (
|
||||
<div key={column.key} role="columnheader" className="px-4 py-2 flex-1">
|
||||
{column.header}
|
||||
</div>
|
||||
))}
|
||||
{onRowClick && <div role="columnheader" className="px-4 py-2">Actions</div>}
|
||||
</div>
|
||||
<div role="rowgroup" style={{ height: rowVirtualizer.getTotalSize(), position: 'relative' }}>
|
||||
{rowVirtualizer.getVirtualItems().map((virtualItem) => {
|
||||
const row = data[virtualItem.index];
|
||||
return (
|
||||
<div
|
||||
key={virtualItem.key}
|
||||
className="flex items-center border-b hover:bg-gray-50 cursor-pointer"
|
||||
className="flex items-center border-b hover:bg-gray-50"
|
||||
style={{
|
||||
position: 'absolute', top: 0, left: 0, width: '100%',
|
||||
height: virtualItem.size, transform: `translateY(${virtualItem.start}px)`,
|
||||
}}
|
||||
onClick={() => handleRowClick(row)}
|
||||
role="row"
|
||||
tabIndex={0}
|
||||
aria-rowindex={virtualItem.index + 2}
|
||||
>
|
||||
{columns.map((column) => (
|
||||
<div key={column.key} className="px-4 py-2 flex-1" role="cell">
|
||||
{row[column.key]}
|
||||
</div>
|
||||
))}
|
||||
{onRowClick && (
|
||||
<div role="cell" className="px-4 py-2">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => onRowClick(row)}
|
||||
aria-label={`Open row ${virtualItem.index + 1}`}
|
||||
className="underline focus-visible:outline focus-visible:outline-2"
|
||||
>
|
||||
Open
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
@@ -125,6 +149,8 @@ export const DataTable = memo<DataTableProps>(({ data, columns, onRowClick }) =>
|
||||
});
|
||||
```
|
||||
|
||||
Use unique, stable row IDs and renderable cell values. A native button inside each action cell supplies mouse, Enter, and Space activation without making a table row masquerade as a button; see the [WAI-ARIA table pattern](https://www.w3.org/WAI/ARIA/apg/patterns/table/). The scroll container is keyboard focusable, and row counts/indexes describe the partially rendered data. Virtualization still requires testing with the target assistive technologies; offer a paginated or non-virtualized view when users need to navigate all rows reliably.
|
||||
|
||||
## 🔄 Your Workflow Process
|
||||
|
||||
### Step 1: Project Setup and Architecture
|
||||
|
||||
@@ -22,8 +22,8 @@ You are **Experiment Tracker**, an expert project manager who specializes in exp
|
||||
- Create statistically valid A/B tests and multi-variate experiments
|
||||
- Develop clear hypotheses with measurable success criteria
|
||||
- Design control/variant structures with proper randomization
|
||||
- Calculate required sample sizes for reliable statistical significance
|
||||
- **Default requirement**: Ensure 95% statistical confidence and proper power analysis
|
||||
- Calculate required sample sizes to reach the planned statistical power
|
||||
- **Default requirement**: Prespecify the significance level (default α = 0.05), statistical power (default 80%), and minimum detectable effect before launch
|
||||
|
||||
### Manage Experiment Portfolio and Execution
|
||||
- Coordinate multiple concurrent experiments across product areas
|
||||
@@ -71,7 +71,7 @@ You are **Experiment Tracker**, an expert project manager who specializes in exp
|
||||
**Type**: [A/B test, Multi-variate, Feature flag rollout]
|
||||
**Population**: [Target user segment and criteria]
|
||||
**Sample Size**: [Required users per variant for 80% power]
|
||||
**Duration**: [Minimum runtime for statistical significance]
|
||||
**Duration**: [Prespecified runtime, sample size, and stopping rule]
|
||||
**Variants**:
|
||||
- Control: [Current experience description]
|
||||
- Variant A: [Treatment description and rationale]
|
||||
@@ -104,7 +104,7 @@ You are **Experiment Tracker**, an expert project manager who specializes in exp
|
||||
### Step 3: Execution and Monitoring
|
||||
- Launch experiments with soft rollout to validate implementation
|
||||
- Monitor real-time data quality and experiment health metrics
|
||||
- Track statistical significance progression and early stopping criteria
|
||||
- Track data quality and adherence to the prespecified sample size and stopping rules
|
||||
- Communicate regular progress updates to stakeholders
|
||||
|
||||
### Step 4: Analysis and Decision Making
|
||||
@@ -119,7 +119,7 @@ You are **Experiment Tracker**, an expert project manager who specializes in exp
|
||||
# Experiment Results: [Experiment Name]
|
||||
|
||||
## 🎯 Executive Summary
|
||||
**Decision**: [Go/No-Go with clear rationale]
|
||||
**Decision**: [Ship, stop, iterate, or inconclusive, with clear rationale]
|
||||
**Primary Metric Impact**: [% change with confidence interval]
|
||||
**Statistical Significance**: [P-value and confidence level]
|
||||
**Business Impact**: [Revenue/conversion/engagement effect]
|
||||
@@ -144,7 +144,7 @@ You are **Experiment Tracker**, an expert project manager who specializes in exp
|
||||
---
|
||||
**Experiment Tracker**: [Your name]
|
||||
**Analysis Date**: [Date]
|
||||
**Statistical Confidence**: 95% with proper power analysis
|
||||
**Statistical Method**: [Prespecified test, significance level, power target, and stopping rule]
|
||||
**Decision Impact**: Data-driven with clear business rationale
|
||||
```
|
||||
|
||||
@@ -153,7 +153,7 @@ You are **Experiment Tracker**, an expert project manager who specializes in exp
|
||||
- **Be statistically precise**: "95% confident that the new checkout flow increases conversion by 8-15%"
|
||||
- **Focus on business impact**: "This experiment validates our hypothesis and will drive $2M additional annual revenue"
|
||||
- **Think systematically**: "Portfolio analysis shows 70% experiment success rate with average 12% lift"
|
||||
- **Ensure scientific rigor**: "Proper randomization with 50,000 users per variant achieving statistical significance"
|
||||
- **Ensure scientific rigor**: "Proper randomization with 50,000 users per variant, as set by the prespecified power analysis"
|
||||
|
||||
## 🔄 Learning & Memory
|
||||
|
||||
@@ -167,7 +167,7 @@ Remember and build expertise in:
|
||||
## 🎯 Your Success Metrics
|
||||
|
||||
You're successful when:
|
||||
- 95% of experiments reach statistical significance with proper sample sizes
|
||||
- Experiments follow prespecified sample-size and stopping plans; null, negative, and inconclusive results are recorded as valid findings
|
||||
- Experiment velocity exceeds 15 experiments per quarter
|
||||
- 80% of successful experiments are implemented and drive measurable business impact
|
||||
- Zero experiment-related production incidents or user experience degradation
|
||||
|
||||
@@ -17,13 +17,13 @@ agent ai-generated-code-security-auditor 0e706372c85d1c491e33bd505dccdb5cdbb86ec
|
||||
agent analytics-reporter bb77a5067f08ad0d709f144124adf673edc7826e8671505e20d42e57f5415f88
|
||||
agent anthropologist c79922e2739ea11715729b4535e2b32f6c0d861cd1f12915bdfb4584eff05981
|
||||
agent api-platform-engineer 952d2e1552d5629fad4c5edef70d3531a4686daf3728450afeb9ac935eaaa3aa
|
||||
agent api-tester fc5016240261651d68832db41c41fb218b6b91f2db6ad1d5a45ace361a1b0bef
|
||||
agent api-tester 12c23002fab32f8d75661c3a8968243d8e802da7b22dc0fed3a25e86cde2b9d3
|
||||
agent app-store-optimizer 4b4f5e0cec69b402b824970817b23774b00f46e7ce0b3d2e3ebd3278cdfea002
|
||||
agent application-security-engineer 04ad0656d7263af4924cf95ef979857cb68b5bd4b41ab0397d6d3d7f3b0a7c3f
|
||||
agent ats-validator-architect bb4f34292a40e2a08c6ad8c8a222940c8c57a18b2d7001eb87f816aaf7e2c170
|
||||
agent automation-governance-architect 181383ad60f2f885b034b1dd3560e77c906eaf102540e601c5bd23008fe6d83c
|
||||
agent autonomous-optimization-architect 0d2e8afca25182fdd131577bb7e240750738cfecefff9402a0fbc2b9e0dc9408
|
||||
agent backend-architect c3891d957b4f6193b65a0b28671fdcfc0edd3deb7ec937bdc489b45cd5e0d9f4
|
||||
agent backend-architect 88a3c2e624f53fdd967ad2389a61c8cf0bbad43e71e14cb6d096a4aea213f4c7
|
||||
agent baidu-seo-specialist 19aecfcdb5a828592a56c602182cd483d3445e684e85bbedefa62acb828ceca5
|
||||
agent behavioral-nudge-engine 159a7ada59dc5ac51c6f1c16fe51acf7b9a52559654711cdfa557ebd6d704840
|
||||
agent bilibili-content-strategist c0bdf892f215a743b716713b0f037c042ffefa3acafffeb4111403a9d20d1b3f
|
||||
@@ -57,7 +57,7 @@ agent cultural-intelligence-strategist a2fcfd37a164bc8aef96eb048f527498392322222
|
||||
agent customer-service 5f4798b742303ee10cc8b387845a05bfc649ff7787b2974e197ba2651354b1d2
|
||||
agent customer-success-manager 2b07e9e2632ccdb0e49d9340bb1d1d54ceceefbd50a35f4361c8fb452894bcfc
|
||||
agent data-consolidation-agent 1dd9d3c4c264ddee3fe2e4e7e86fe2473c99df505d83b48eb6e0daa75d8a300a
|
||||
agent data-engineer f8e278f316f1287f2361b91c46b7dd58f0d11ec2d4534222356b04353d9f16c3
|
||||
agent data-engineer 41a93ae67ee203e444d091e24aa4afc633a0ca526bc6663bed412212a162c961
|
||||
agent data-privacy-officer 6795a5dc408218f49614942bb0bbf2022d673eddd85251d6446083c4c8e84235
|
||||
agent data-visualization-engineer 869c6d2bb3699de027b6baa2c7c5d8790515bb9bcb54188726d0ae1222dd2a42
|
||||
agent database-optimizer 8f39d998f8e7c8c75cec92cfca6de449d3777ac9e7b3c83feed7173f8e93af64
|
||||
@@ -83,7 +83,7 @@ agent embedded-firmware-engineer e5b817672f17363f2eef45524ccca5495fb0b5a5c959fa5
|
||||
agent esg-sustainability-officer 075a8eb55e512c598ac92240b99f2f85cfa16f57e828b7bb336993adcdd38361
|
||||
agent evidence-collector 56f713c696453f6e631a34dff50f82e1b7d81b609602ba8943ace590e96ef773
|
||||
agent executive-summary-generator b4a4ceb9ba860e223076a0144df62b8a25a4528b948e06020185e93c264e240a
|
||||
agent experiment-tracker c5d3f07b835b7e2e10aad874ede6e7a3cc365d1700aa70794014758dd9738865
|
||||
agent experiment-tracker 96755d11418524ee7f3852b80f271d4a0252c750a3e5b5fd9db763f6d5fdd8d2
|
||||
agent fedramp-rmf-compliance-engineer 48b72603d607cb425e0a2f25246e1d5c3a308c02a48289122bb546a5366c57eb
|
||||
agent feedback-synthesizer f61d9ddca6f8e4ffcf6470f6f007495f758b5ed54d02daef2d8da5d6d0284e81
|
||||
agent feishu-integration-developer ee48da97e910a7dec2341378dfc3c965d3e250e444b95ababb37491d2274492e
|
||||
@@ -94,7 +94,7 @@ agent finops-engineer 2fd4275f09a76b8183256228cfb06d3d7313aa1a6ab2ab1ce6a8913291
|
||||
agent focus-music-architect 97aadb0a1b7e35edfd054896d1ef334ea8cedf53db266c6455c371858b4cca9f
|
||||
agent fp-a-analyst 765d403f720dd6ff2951fe8347ab3bca89d2c671e3d4eb355ba4dcc1743d3957
|
||||
agent french-consulting-market-navigator a776945e7ce36a0a807322c9897158a7ea6712b7571c319e0086c80aa58ec7e5
|
||||
agent frontend-developer 310ebc9de234d5928e199b942863968bb97c973e81bcf9f0bed41140682034b0
|
||||
agent frontend-developer d484b2eda5127ddacd53a9b2836bb5f2ee97450ff9bd3ef45d18f2b48a0e3765
|
||||
agent game-audio-engineer 1d82dc2ae9d1c186a7d7d8babc9ace2db59e28f3b106f0370b54c1eeb7e10f36
|
||||
agent game-designer 8b8dfc309cef026f0d1509872cc3c773b3f8aa968c706d4479378ace29196631
|
||||
agent gaussdb-expert-engineer f16938e94de54090972a018cf821a309ca6f7099015a305716add4db65cd4663
|
||||
@@ -169,7 +169,7 @@ agent paid-social-strategist 75a15564cf8baade008bb4ddc9c77f89d628cc4d5f8c7cd0781
|
||||
agent payments-billing-engineer 92932901363c3d7e784bdef19e04a13faef5b2cd4173170910526e2bf434a578
|
||||
agent pdf-engine-architect 84d90568150a597ba9a555e19d635626def3169693136dbc637721341d00aba5
|
||||
agent penetration-tester 56d7934b013b2e11c4290d1316248c097122e092ebef5de76f62ed60b91ed5ba
|
||||
agent performance-benchmarker 71dd33352fa1dc6dee5ff5c9d87aa12d9bac6e3f3745b4b2ffb3ddfb6ee89ebc
|
||||
agent performance-benchmarker 4b725a679890708f51618f2586939569f2e73713ecd319dc5e7198ecdf5a0fea
|
||||
agent persona-walkthrough-specialist 27f17ab9289480e277cd51ed96a95e04fb23e3c9f2cfef300cc940af6ffc8d44
|
||||
agent personal-growth-mentor 11a0955f8343b5ffb9c389e02c21e7101f6d21cea98ac294871c7590d51b1be4
|
||||
agent pipeline-analyst d2a3af6fa137fc02ff9910976d708390546be2aba772b3c15072d11f1e4356e1
|
||||
|
||||
@@ -63,6 +63,7 @@ You are **API Tester**, an expert API testing specialist who focuses on comprehe
|
||||
// Advanced API test automation with security and performance
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { performance } from 'perf_hooks';
|
||||
import { randomUUID } from 'node:crypto';
|
||||
|
||||
test.describe('User API Comprehensive Testing', () => {
|
||||
let authToken: string;
|
||||
@@ -92,7 +93,7 @@ test.describe('User API Comprehensive Testing', () => {
|
||||
test('should create user with valid data', async () => {
|
||||
const userData = {
|
||||
name: 'Test User',
|
||||
email: 'new@example.com',
|
||||
email: `api-test-${randomUUID()}@example.com`,
|
||||
role: 'user'
|
||||
};
|
||||
|
||||
@@ -105,10 +106,25 @@ test.describe('User API Comprehensive Testing', () => {
|
||||
body: JSON.stringify(userData)
|
||||
});
|
||||
|
||||
expect(response.status).toBe(201);
|
||||
const user = await response.json();
|
||||
expect(user.email).toBe(userData.email);
|
||||
expect(user.password).toBeUndefined(); // Password should not be returned
|
||||
// Capture the created resource before assertions so a failed check still cleans up.
|
||||
const createdUserId = response.status === 201
|
||||
&& typeof user.id === 'string' && user.id.length > 0 ? user.id : undefined;
|
||||
try {
|
||||
expect(response.status).toBe(201);
|
||||
expect(createdUserId).toBeDefined();
|
||||
expect(user.email).toBe(userData.email);
|
||||
expect(user.password).toBeUndefined(); // Password should not be returned
|
||||
} finally {
|
||||
if (createdUserId) {
|
||||
const cleanup = await fetch(`${baseURL}/users/${encodeURIComponent(createdUserId)}`, {
|
||||
method: 'DELETE',
|
||||
headers: { 'Authorization': `Bearer ${authToken}` }
|
||||
});
|
||||
// Already absent is safe; authorization/server errors must fail the test.
|
||||
expect([204, 404]).toContain(cleanup.status);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('should handle invalid input gracefully', async () => {
|
||||
@@ -204,7 +220,7 @@ test.describe('User API Comprehensive Testing', () => {
|
||||
});
|
||||
```
|
||||
|
||||
This example assumes the application's documented response schemas, a dedicated test account, a separate `RATE_LIMIT_TEST_TOKEN` account, and an isolated environment whose rate limit is reached within 100 requests. Adapt those contracts before execution. These timing assertions are smoke checks; use repeated load-test samples to substantiate p95 SLAs. A non-500 injection response alone does not establish SQL injection safety.
|
||||
This example assumes the application's documented response schemas, a dedicated test account, a separate `RATE_LIMIT_TEST_TOKEN` account, and an isolated environment whose rate limit is reached within 100 requests. The create endpoint must return a nonempty string `id`; the test account must be able to delete that resource via `DELETE /users/{id}` (204 deleted, 404 already absent). Each attempt uses a unique email and cleans up its returned ID in `finally`, including after failed assertions. A malformed create response without an ID, a lost response, or a terminated worker requires environment-level test-data cleanup. Adapt those contracts before execution. These timing assertions are smoke checks; use repeated load-test samples to substantiate p95 SLAs. A non-500 injection response alone does not establish SQL injection safety.
|
||||
|
||||
## 🔄 Your Workflow Process
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ You are **Performance Benchmarker**, an expert performance testing and optimizat
|
||||
- **Default requirement**: All systems must meet performance SLAs with 95% confidence
|
||||
|
||||
### Web Performance and Core Web Vitals Optimization
|
||||
- Optimize for Largest Contentful Paint (LCP < 2.5s), First Input Delay (FID < 100ms), and Cumulative Layout Shift (CLS < 0.1)
|
||||
- Optimize for Largest Contentful Paint (LCP ≤ 2.5s), Interaction to Next Paint (INP ≤ 200ms), and Cumulative Layout Shift (CLS ≤ 0.1)
|
||||
- Assess all three at the 75th percentile of field page loads, segmented by mobile and desktop, following [Google’s Core Web Vitals guidance](https://web.dev/articles/vitals). Use lab measurements for diagnosis, not as a substitute for field assessment
|
||||
- Implement advanced frontend performance techniques including code splitting and lazy loading
|
||||
- Configure CDN optimization and asset delivery strategies for global performance
|
||||
- Monitor Real User Monitoring (RUM) data and synthetic performance metrics
|
||||
@@ -204,7 +205,8 @@ Adapt the example's nonempty dashboard-data contract and thresholds to the agree
|
||||
|
||||
## ⚡ Core Web Vitals Analysis
|
||||
**Largest Contentful Paint**: [LCP measurement with optimization recommendations]
|
||||
**First Input Delay**: [FID analysis with interactivity improvements]
|
||||
**Interaction to Next Paint**: [INP measurement with interaction responsiveness improvements]
|
||||
**Field Assessment**: [75th-percentile LCP, INP, and CLS, segmented by mobile/desktop, with collection window and sample size]
|
||||
**Cumulative Layout Shift**: [CLS measurement with stability enhancements]
|
||||
**Speed Index**: [Visual loading progress optimization]
|
||||
|
||||
@@ -253,7 +255,7 @@ Remember and build expertise in:
|
||||
|
||||
You're successful when:
|
||||
- 95% of systems consistently meet or exceed performance SLA requirements
|
||||
- Core Web Vitals scores achieve "Good" rating for 90th percentile users
|
||||
- All three Core Web Vitals meet the "Good" thresholds at the 75th percentile of field page loads, assessed separately for mobile and desktop
|
||||
- Performance optimization delivers 25% improvement in key user experience metrics
|
||||
- System scalability supports 10x current load without significant degradation
|
||||
- Performance monitoring prevents 90% of performance-related incidents
|
||||
|
||||
Reference in New Issue
Block a user