Conversation
…lassification fix(email): preserve DSN failure classification during reconciliation
- Add OUTBOUND_REJECTION_CIRCUIT_BREAKER to CampaignPauseReason enum - Add pure evaluateCircuitBreaker and isCircuitBreakerRejectionCategory schema utilities - Add CampaignCircuitBreakerService in apps/api with atomic check-and-trip logic - Preserve USER_REQUESTED pauses, STOPPED, COMPLETED, and FAILED campaign states - Cancel in-flight jobs and pause sequence executions upon tripping breaker - Record resumedAt in CampaignService.resumeCampaign to bound subsequent rolling windows - Hook circuit breaker evaluation into EmailService.send and ReconciliationService DSN bounces - Add comprehensive unit tests covering criteria A through J
…n-circuit-breaker feat(campaigns): add outbound rejection circuit breaker (#35)
…inality-limits feat(outreach): enforce domain pacing and company contact limits (#36)
…spatch fix(email): prevent ambiguous delivery blind re-dispatch (#37)
…suppression fix(outreach): enforce company dnc and domain suppression cascade (#38)
- Remove 24 historical phase, audit, and remediation reports from root - Remove obsolete docs directories (docs/archive, docs/architecture-migration, docs/forensics, docs/reliability) - Consolidate lasting architectural truths into docs/architecture/ (outreach-lineage, inbound-suppression, operational-reliability, system-invariants-matrix) - Relocate testing_architecture.md into docs/testing/testing-architecture.md - Remove 44 obsolete phase verification and one-off ad-hoc scripts from scripts/ - Remove dead repository wrappers from apps/desktop and scratch file from apps/api - Remove tracked build artifacts (event-bus.js, event-bus.d.ts, event-bus.js.map, scheduler-tool-adapter.d.ts) and ignore *.map - Rename 13 phase-named tests to canonical behavior-oriented test names - Update run-tests.js, vitest.config.ts, and apps/desktop/vitest.config.ts
Chore/repository cleanup baseline
docs: add current-state release audit report detailing system readiness and blockers
…s, and application layout
…lock and configure root vitest alias
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This pull request promotes all qualified changes on
devtomainfor the LeadForge OS production release (v1.1.1-beta.5).The release consolidates the full architectural progression from Phase 1 through Phase 12, along with the two most recent production fixes addressing DiscoveryRun Cascade Deletion and Workspace Switching & Creation Rehydration. All modifications adhere to LeadForge's core architecture invariant:
Included Changes
Phase 1 — Safe Optional Email Tracking
trackingEnabled = falseby default).https://api.leadforge.kapiljangid.pro). Localhost, RFC 1918 private subnets, link manipulation, and loopback destinations are hard-rejected with zero silent fallback.Phase 2 — Persistent Scheduler Concurrency Policy
Phase 3 — Discovery / Outreach Scheduler Fairness
outreach:campaign,workflow,IMAP polldiscovery:scraper maps,crawler,intelligence,enrichmentPhase 4 — IPC Contract Repair
IpcChannelMap, and eliminated duplicate listeners.Phase 5 — Contact Selection (Explicit IDs)
selectedIds).Phase 5B — Select All Matching Contacts
selectedIds[]) or query snapshot (all-matchingwithexcludedIds[]and authoritative query bounds).Phase 6 — Projection Synchronization / Global Refresh
audiences,companies,contacts,campaigns, anddiscovery_runs.Phase 7 — Safe DiscoveryRun Deletion (Baseline)
Phase 8 — Safe Company Deletion Semantics
company-onlyvscompany-and-eligible-contacts).Phase 9 — IMAP Polling Efficiency
startSeq:*) based on configured lookback windows.Phase 10 — Email Threading / Message Semantics
Message-ID, provider message ID, and provider thread ID.Message-ID,In-Reply-To, andReferencesheaders when predecessor metadata exists, refusing to fabricate threading headers for legacy records lacking RFC identifiers.Phase 11 — Geography Selector
<datalist>with a responsive, searchable hierarchical selector (Country→State/Region→City).Phase 12 — Email Logs Filter UX
role="group"accessibility, and explicit "Reset Filters" action.Fix A — DiscoveryRun Cascade Deletion
DiscoveryRunautomatically deletes companies and contacts that were discovered/created exclusively by that run.CompanyDiscoveryRunModel.company.createdAt < run.createdAt) are preserved.Fix B — Workspace Switching & Creation Rehydration
WorkspaceRuntime.start()awaitsCacheHydrator.hydrateWorkspaceCache()before signaling readiness, ensuring SQLite is populated before React Query invalidations fire.switchWorkspaceflow.CacheHydratorverifies target workspace before each table batch, immediately aborting stale hydrations if the user switches workspaces rapidly (A -> B -> C).sync:completedevents carry{ scope: 'all', workspaceId, timestamp }and renderer filters out events targeted at inactive workspaces.Prior Production Hardening
Release-Critical Fixes
referenceTime: Date = new Date()parameter toisMailboxEligibleForDispatch()in@leadforge/schema, resolving non-deterministic test failures when running against historical or simulated timestamps.'@': path.resolve(__dirname, 'apps/desktop/src')to rootvitest.config.ts, enabling test suites importing desktop UI primitives to execute seamlessly from repository root.deleteRunreturn object inapps/api/src/services/discovery-run/discovery-run.service.tsto conditionally omit undefined keys, guaranteeing strict TypeScript typecheck compliance.Architecture / Safety Notes
LocalCRMRepository.softDeleteFromServerguarantees local cache writes do not revive records removed on the authoritative server.EmailDeliveryModel) and sequence executions (SequenceExecutionModel) are never deleted during run or company cascade cleanup.Testing
Automated Test Matrix
npx vitest run).node apps/desktop/scripts/run-tests.js).optional-tracking-safety.test.ts,tracking.test.tsscheduler-policy-persistence.test.ts,scheduler-policy-loading.test.ts,workspace.test.tsscheduler-fairness.test.tsipc-contract.test.tscontact-selection.test.tsprojection-sync.test.tsdiscovery-run-deletion.test.ts(API & Desktop)company-deletion.test.tsimap-poller.test.tsemail-threading.test.tsgeography-selector.test.tsemail-logs-filters.test.tsworkspace-lifecycle.test.tsnpx turbo run check-types).npx tsx scripts/verify-repo-health.ts).Manual Smoke Tests
The following workflows were exercised and validated:
EventBus, log rotation,JobSchedulerreconciliation, and telemetry metric validation inside an Electron Node 22 runtime (scripts/smoke-test.ts— PASSED).trackingEnabled: falsecontain no open pixels or modified links, whiletrackingEnabled: trueroutes exclusively through public HTTPS endpoints.Known Limitations
Rollback Considerations
mainrequires no database rollback scripts.