From 79dcef389ee185f72ce7975a686aa6db4fded83b Mon Sep 17 00:00:00 2001 From: Arthur Souza Rodrigues Date: Sun, 17 May 2026 06:45:25 -0400 Subject: [PATCH] =?UTF-8?q?idx=3D6:=20freeze=20(69=20records)=20=E2=80=94?= =?UTF-8?q?=20ARRIS=20Employment=20Agreement:=20inline=20IWW+sig=20page=20?= =?UTF-8?q?split=20+=20Section-ref=20filter=20for=20inline=20N.=20markers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit idx=6 is a Form 10 EX-10.1 Employment Agreement (ARRIS Group / Timothy O'Loughlin, 2016). doc2dict ships two structural pathologies in this filing: 1. The entire signature page (IWW operating clause + party labels + /s/ marks + By:/Name:/Title: fields) is packed into the trailing body text of "(j) Waiver of Breach" — the last lettered subsection of Section 12 (Miscellaneous). Result: zero L1 IWW record, zero L2 sig-line records. 2. Sections 11 (Arbitration—Exclusive Remedy) and 12 (Miscellaneous, with subsections (a)-(e) inline) are stuffed inside the preamble paragraph's body. Result: 12 visible top-level sections in source but only 10 L1 records in JSONL, with sections 11/12 buried. Both fixes are structural — no phrase blocklists. Change 1: new function _split_iww_and_sig_from_body (runs before _explode_signature_block_lines). Guard: returns rows unchanged if the document already has any record whose title/body STARTS with the IWW phrase (this is the case for all six prior idxs, so they are untouched). When the guard passes and a body contains IWW mid-text, the body is split into prefix + IWW operating clause + sig-page lines, the IWW becomes an L1 record, and each unique sig-page line becomes an L2 record marked `_sig_line=True` so `_consolidate_sig_lines_after_iww` anchors them after the IWW. Global per-block dedup collapses the doc2dict pathology where party labels, /s/ marks, and names are emitted twice. Change 2: in _split_inline_section_markers, filter out raw-marker candidates whose preceding 15 chars match `\\bSections?\\s*[\\xa0\\s]*$`. This rejects textual cross-references like "this Section 5." or "Sections 7, 8 and 9 hereof" that the marker regex otherwise picks up as section-start hits. For idx=6 nid=3 (the preamble), this drops the false-positive `5` and reduces the marker sequence to [11, 12] — a clean gap-1 monotonic run that triggers the existing split path, emitting Section 11 (Arbitration) and Section 12 (Miscellaneous) as their own L1 records. Bytewise-confirmed: idx=0..5 frozen output is unchanged. idx=6 freeze passes all gates (1 L0, max level 3, monotonic order, 99% word coverage, no boilerplate). Full regress (all 7 idxs) OK. Final shape: 69 records, levels {0: 1, 1: 14, 2: 45, 3: 9}. The 14 L1 records cover the preamble + Sections 1-12 + the IWW operating clause. The 45 L2 records cover lettered subsections and the per-line sig block. The 9 L3 records cover the deep roman/letter nesting under Sections 5 (General Release sub-items) and 6 (Good Reason sub-clauses). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../level_freeze/frozen/idx_6.jsonl | 69 +++++++ data/auto_parse/level_freeze/state.json | 27 ++- scripts/parse_doc2dict_with_config.py | 178 +++++++++++++++++- 3 files changed, 272 insertions(+), 2 deletions(-) create mode 100644 data/auto_parse/level_freeze/frozen/idx_6.jsonl diff --git a/data/auto_parse/level_freeze/frozen/idx_6.jsonl b/data/auto_parse/level_freeze/frozen/idx_6.jsonl new file mode 100644 index 0000000..efd667f --- /dev/null +++ b/data/auto_parse/level_freeze/frozen/idx_6.jsonl @@ -0,0 +1,69 @@ +{"idx": 6, "order": 0, "level": 0, "span": "EMPLOYMENT AGREEMENT"} +{"idx": 6, "order": 1, "level": 1, "span": "THIS EMPLOYMENT AGREEMENT (the “Agreement”), dated as of 4 January, 2016 is by and between ARRIS GROUP, INC.\n, a\nDelaware corporation (the “Company”), and Timothy O’Loughlin (“Executive”). \nWHEREAS, Executive and the\nCompany want to enter into a written agreement providing for the terms of Executive’s employment by the Company.\nNOW, THEREFORE, in\nconsideration of the foregoing recital and of the mutual covenants set forth herein, and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties agree as follows:\nExecutive’s initial job title will be President, North American Sales and his\nduties will be those as are designated, directly or indirectly, by the Chief Executive Officer of the Company. Executive further agrees to serve, without additional compensation, as an officer or director, or both, of any subsidiary, division or\naffiliate of the Company or any other entity in which the Company holds an equity interest, provided, however, that (a) the Company shall indemnify Executive from liabilities in connection with serving in any such position to the same extent as\nhis indemnification rights pursuant to the Company’s Certificate of Incorporation, By-laws and applicable Delaware law, and (b) such other position shall not materially detract from the\nresponsibilities of Executive pursuant to this Section 1 or his ability to perform such responsibilities.\nconviction of a felony or a crime involving moral turpitude; (ii) Executive’s commission of an act constituting fraud, deceit or material misrepresentation with respect to the Company;\n(iii) Executive’s embezzlement of funds or assets from the Company; (iv) Executive’s harassment or mistreatment of a Company employee or contractor or other misconduct, which if generally known would cause, as determined in good\nfaith by the Company’s Board of Directors, the Company embarrassment with its customers or the public generally; (v) Executive’s addiction to any alcoholic, controlled or illegal substance or drug; (vi) Executive’s\ncommission of any act or omission which would give the Company the right to terminate Executive’s employment under applicable law; or (vii) Executive’s failure to correct or cure any material breach of or default under this Agreement\nwithin ten days after receiving written notice of such breach or default from the Company.\npreceding sentence must be made no later than when the related taxes, interest and penalties that are the subject of the audit or litigation are to be remitted to the taxing authorities or, where\nno such taxes, interest and penalties are remitted, within thirty (30) days of when the audit is completed or there is a final non-appealable settlement or resolution of the litigation.\nNotwithstanding the foregoing, as a condition to the payment to Executive of any amounts pursuant to this Section 5, Executive shall execute and deliver\nto the Company a release in the customary form then being used by the Company, which may include non-disparagement and confidentiality agreements. In exchange for such release, the Company shall, if\nExecutive’s employment is terminated without Cause, provide a release to Executive, but only with respect to claims against Executive which are actually known to the Company as of the time of such termination. Executive will be required to\nexecute and not revoke the Company’s standard written release of any and all claims against the Company and all related parties with respect to all matters arising out of Executive’s employment by the Company (other than as described\nabove) no later than thirty (30) days following Executive’s termination of employment (or such later time as the Company may permit). If the Executive does not provide such release, with the period for revoking same having already expired,\nthen Company shall not be required to pay any further amounts pursuant to this Section 5 and Executive will be required to return to the Company any amounts previously paid pursuant to this Section 5.\nNot more than fourteen (14) days following the termination of employment the Company will\nnotify Executive in writing (A) whether the severance benefits payable pursuant to this Agreement when added to any other Parachute Payments payable to Executive exceed an amount equal to 299% (the “299% Amount”) of Executive’s\n“base amount” as defined in Section 280G(b)(3) of the Code, (B) the amount that is equal to the 299% Amount, (C) whether the severance benefit described in this Agreement or the Conditional Capped Amount pursuant to clause\n(ii) above is greater on an after-tax basis and (C) if the Conditional Capped Amount is the greater amount, the amount that the severance benefits payable pursuant to this Agreement must be reduced\nto equal such amount.\nThe calculation of the 299% Amount, the determination of whether the termination benefits described in clause\n(i) above or the Conditional Capped Amount described in clause (ii) above is greater on an after-tax basis and, if the Conditional Capped Amount in clause (ii) is the greater amount, the\ndetermination of how much Executive’s termination benefits must be reduced in order to avoid application of the 280G Excise Tax will be made by the Company’s public accounting firm in accordance with section 280G of the Code or any\nsuccessor provision thereto. For purposes of making the reduction of amounts payable under this Agreement, such amounts shall be eliminated in the following order: (1) any cash compensation, (2) any health or welfare benefits, (3) any\nequity compensation, and (4) any other payments hereunder. Reductions of such amounts shall take place in the chronological order with respect to which such amounts would be paid from the date of the termination of employment absent any\nacceleration of payment. If the reduction of the amounts payable hereunder would not result in a reduction of the Parachute Payments to the Conditional Capped Amount, no amounts payable under this Agreement shall be reduced pursuant to this\nprovision. The costs of obtaining such determination will be borne by the Company.\n“Business of Company” means providing products and services to broadband internet service providers which support a full range of\nintegrated voice, video and high-speed data services to the subscribers of such providers.\n“Restricted Period” means the period\nbeginning on the Termination Date and ending twelve (12) months after the Termination Date.\n“Restricted Territory” means,\nand is limited to, the following Metropolitan Statistical Areas: (1) Atlanta - Sandy Springs - Roswell, GA, (2) Denver - Aurora - Lakewood, CO, (3) Portland - Vancouver - Hillsboro, OR-WA,\n(4) Philadelphia - Camden - Wilmington, PA-NJ-DE-MD, (5) New York - Newark - Jersey City, NY-NJ-PA, (6) San Francisco - Oakland - Hayward, CA, (7) Los Angeles - Long Beach -\nAnaheim, CA, (8) St. Louis, MO-IL, (9) San Diego - Carlsbad, CA, (1) San Jose - Sunnyvale - Santa Clara, CA, and (11) Columbus, OH, and\n(12) Boston - Cambridge - Newton MA-NH. Executive acknowledges and agrees that this is the area in which the Company does business at the time of execution of this Agreement, and in which Executive will\nhave responsibility, at a minimum, on behalf of the Company.\n“Material Contact” means contact in person, by telephone or by\npaper or electronic correspondence, in furtherance of the business interests of Company.\nNotwithstanding the foregoing, it is understood and agreed that, without limitation on other available remedies, the\nrestrictions on Executive set forth in this Section 7(b), (c), (d) and (e) hereof shall not be applicable at any time that Company is in breach of its contractual obligations to Executive under this Agreement following the thirty (30) days\nafter being notified in writing by Executive of such breach and failure of Company to cure same. In the event Company cures such breach, the restrictions set forth in Sections 7(b), (c), (d) and (e) hereof shall continue pursuant to their terms\nas if such breach never occurred.\nplans, customer lists, methods of doing business and other confidential information (collectively, referred to as “Trade Secrets”) which are owned by the Company, its subsidiaries\nand/or affiliates and regularly used in the operation of its business, and as to which the Company, its subsidiaries and/or affiliates take precautions to prevent dissemination to persons other than certain directors, officers and employees.\nExecutive acknowledges and agrees that the Trade Secrets (1) are secret and not known in the industry; (2) give the Company or its subsidiaries or affiliates an advantage over competitors who do not know or use the Trade Secrets;\n(3) are of such value and nature as to make it reasonable and necessary to protect and preserve the confidentiality and secrecy of the Trade Secrets; and (4) are valuable, special and unique assets of the Company or its subsidiaries or\naffiliates, the disclosure of which could cause substantial injury and loss of profits and goodwill to the Company or its subsidiaries or affiliates. Executive may not use in any way or disclose any of the Trade Secrets, directly or indirectly,\neither during the term of this Agreement or at any time thereafter, except as required in the course of his employment under this Agreement, if required in connection with a judicial or administrative proceeding, or if the information becomes public\nknowledge other than as a result of an unauthorized disclosure by the Executive. All files, records, documents, information, data and similar items relating to the business of the Company, whether prepared by Executive or otherwise coming into her\npossession, will remain the exclusive property of the Company and may not be removed from the premises of the Company under any circumstances without the prior written consent of the Board (except in the ordinary course of business during\nExecutive’s period of active employment under this Agreement), and in any event must be promptly delivered to the Company upon termination of Executive’s employment with the Company. Executive agrees that upon his receipt of any subpoena,\nprocess or other request to produce or divulge, directly or indirectly, any Trade Secrets to any entity, agency, tribunal or person, Executive shall timely notify and promptly hand deliver a copy of the subpoena, process or other request to the\nBoard. For this purpose, Executive irrevocably nominates and appoints the Company (including any attorney retained by the Company), as his true and lawful\nattorney-in-fact, to act in Executive’s name, place and stead to perform any act that Executive might perform to defend and protect against any disclosure of any\nTrade Secrets.\nthat the nonsolicitation and nondisclosure agreements set forth above each constitute separate agreements independently supported by good and adequate consideration shall be severable from the\nother provisions of, and shall survive, this Agreement. The existence of any claim or cause of action of Executive against the Company, whether predicated on this Agreement or otherwise, shall not constitute a defense to the enforcement by the\nCompany of the covenants of Executive contained in the nonsolicitation and nondisclosure agreements. If any provision of this Agreement is held to be illegal, invalid or unenforceable under present or future laws effective during the term hereof,\nsuch provision shall be fully severable and this Agreement shall be construed and enforced as if such illegal, invalid or unenforceable provision never constituted a part of this Agreement; and the remaining provisions of this Agreement shall remain\nin full force and effect and shall not be affected by the illegal, invalid or unenforceable provision or by its severance herefrom. Furthermore, in lieu of such illegal, invalid or unenforceable provision, there shall be added as part of this\nAgreement, a provision as similar in its terms to such illegal, invalid or enforceable provision as may be possible and be legal, valid and enforceable."} +{"idx": 6, "order": 2, "level": 1, "span": "1. Employment\nExecutive agrees to enter into the continued employment of the Company, and the Company agrees to employ Executive, on\nthe terms and conditions set forth in this Agreement. Executive agrees during the term of this Agreement to devote substantially all of his/her business time, efforts, skills and abilities to the performance of his duties as stated in this Agreement\nand to the furtherance of the Company’s business."} +{"idx": 6, "order": 3, "level": 1, "span": "2. Compensation."} +{"idx": 6, "order": 4, "level": 2, "span": "(a) Base Salary\nDuring the term of Executive’s employment with the Company pursuant to this Agreement, the Company shall pay\nto Executive as compensation for his services an annual base salary of not less than $450,000 (“Base Salary”). Executive’s Base Salary will be payable in arrears (no less frequently than monthly) in accordance with the Company’s\nnormal payroll procedures and will be reviewed annually and subject to upward adjustment at the discretion of the Chief Executive Officer and Compensation Committee, but will not be lowered except in connection with reductions applied to all\nexecutive officers."} +{"idx": 6, "order": 5, "level": 2, "span": "(b) Incentive Bonus\nDuring the term of Executive’s employment with the Company pursuant to this\nAgreement, Executive’s incentive compensation program shall be determined by the Company in its discretion with a target bonus equal to 80% of Base Salary, and allowing for payment of up to 200% of target thereafter. Executive’s bonus, if\nany, shall be payable as soon after the end of each calendar year to which it relates as it can be determined, but in any event within two and one-half (2-1/2) months\nthereafter."} +{"idx": 6, "order": 6, "level": 2, "span": "(c) Executive Perquisites\nDuring the term of Executive’s employment with the Company\npursuant to this Agreement, Executive shall be entitled to receive such executive perquisites and fringe benefits as are provided to the executives in comparable positions and their families under any of the Company’s plans and/or programs in\neffect from time to time and such other benefits as are customarily available to executives of the Company and their families, including without limitation vacations and life, medical and disability insurance. For the purposes of clarity, Executive\nwill be eligible to participate in the Company’s currently available defined contribution plans, but not the Company’s defined benefit plans (which the Company has frozen)."} +{"idx": 6, "order": 7, "level": 2, "span": "(d) Tax Withholding\nThe Company has the right to deduct from any compensation payable to Executive under this Agreement social\nsecurity (FICA) taxes and all federal, state, municipal or other such taxes or charges as may now be in effect or that may hereafter be enacted or required."} +{"idx": 6, "order": 8, "level": 2, "span": "(e) Expense Reimbursements\nThe Company shall pay or reimburse Executive for all reasonable business expenses incurred or paid by\nExecutive in the course of performing his duties hereunder, including but not limited to reasonable travel expenses for Executive. As a condition to such payment or reimbursement, however, Executive shall maintain and provide to the Company\nreasonable documentation and receipts for such expenses. Such payments and reimbursements shall be made as soon as administratively practicable following submission of reasonable documentation and receipts for such expenses but all such payments and\nreimbursements shall be made no later than the last day of the calendar year following the calendar year in which Executive incurs the reimbursable expense."} +{"idx": 6, "order": 9, "level": 1, "span": "3. Term\nUnless sooner terminated pursuant to Section 4 of this Agreement, and subject to the provisions of Section 5 hereof,\nthe term of employment under this Agreement shall commence as of the date hereof and shall continue for a period of one year. The term automatically shall be extended by one day for each day of employment hereunder. Notwithstanding the foregoing the\nterm of employment under this agreement shall terminate, if it has not terminated earlier, without further action on the part of the Company or Executive upon Executive’s 65th birthday."} +{"idx": 6, "order": 10, "level": 1, "span": "4. Termination\nNotwithstanding the provisions of Section 3 hereof, but subject to the provisions of Section 5 hereof,\nExecutive’s employment under this Agreement shall terminate as follows:"} +{"idx": 6, "order": 11, "level": 2, "span": "(a) Death\nExecutive’s employment shall\nterminate upon the death of Executive, provided, however, that the Company shall continue to pay no less frequently than monthly (in accordance with its normal payroll procedures) the Base Salary to Executive’s estate for a period of three\nmonths after the date of Executive’s death."} +{"idx": 6, "order": 12, "level": 2, "span": "(b) Termination for Cause\nThe Company may terminate Executive’s employment\nat any time for “Cause” (as hereinafter defined) by delivering a written termination notice to Executive. For purposes of this Agreement, “Cause” shall mean any of: (i) Executive’s"} +{"idx": 6, "order": 13, "level": 2, "span": "(c) Termination Without\nCause. The Company may terminate Executive’s employment at any time by delivering a written termination notice to Executive."} +{"idx": 6, "order": 14, "level": 2, "span": "(d)\nTermination by Executive. Executive may terminate his employment at any time by delivering ninety days prior written notice to the Company; provided, however, that the terms, conditions and benefits specified in Section 5 hereof shall\napply or be payable to Executive only if such termination occurs as a result of an uncured material breach by the Company of any provision of this Agreement."} +{"idx": 6, "order": 15, "level": 2, "span": "(e) Termination Following Disability\nIn the event Executive becomes mentally or physically impaired or disabled and is unable to\nperform his material duties and responsibilities hereunder for a period of at least ninety days in the aggregate during any one hundred twenty consecutive day period, the Company may terminate Executive’s employment by delivering a written\ntermination notice to Executive. Notwithstanding the foregoing, Executive shall continue to receive his full salary and benefits under this Agreement for a period of six months after the effective date of such termination with his base salary\npayable in arrears no less frequently than monthly in accordance with the Company’s normal payroll procedures and continued benefits on a monthly basis through such time."} +{"idx": 6, "order": 16, "level": 2, "span": "(f) Payments\nFollowing any expiration or termination of this Agreement and Executive’s employment hereunder, in addition any\namounts owed pursuant to Section 5 hereof, the Company shall pay to Executive all amounts earned by Executive hereunder prior to the date of such expiration and termination, as soon as administratively practicable following the date of\ntermination of Executive’s employment, in the normal course consistent with the provisions of this Agreement. Additionally, subject to Executive’s continued compliance with Sections 7, 8 and 9 of this Agreement, if Executive terminates his\nemployment with the Company without Good Reason on or after the date Executive attains age 62 (provided Executive has no less than 10 years of actual continuous service with Company following the date hereof as of such termination), all of\nExecutive’s stock options and equity awards outstanding at termination of Executive’s employment shall continue to vest for four (4) years after the termination as if Executive remained employed through such time, and such stock\noptions shall remain outstanding through the original expiration date of the stock options (disregarding any earlier expiration date based on Executive’s termination of employment)."} +{"idx": 6, "order": 17, "level": 1, "span": "5. Certain Termination Benefits\nSubject to Section 6(a) hereof, in the event (i) the\nCompany terminates Executive’s employment without cause pursuant to Section 4(c) or (ii) Executive terminates his employment pursuant to Section 4(d) after a material breach by the Company (which the Company fails to cure within thirty\ndays after written notice of such breach from Executive):"} +{"idx": 6, "order": 18, "level": 2, "span": "(a) Base Salary and Bonus\nThe Company shall continue to pay to\nExecutive his Base Salary (as in effect as of the date of such termination) no less frequently than monthly in accordance with the Company’s normal payroll procedures, beginning with the first payroll date after the date of termination of\nExecutive’s employment and continuing for twelve (12) months immediately following the termination. The Company also shall pay to Executive (i) a bonus for the fiscal year in which the termination occurs based upon the actual results\nfor such fiscal year reduced on a pro rata basis to reflect only the portion of the year prior to the end of the month in which the termination occurs (e.g., in the event of a termination in March, Executive would receive 1/4 of the amount that he\notherwise would receive), and (ii) an amount equal to the average bonus received, or to be received, by Executive with respect to the three most recently completed fiscal years of the Company (e.g., if Executive has received, or been entitled\nto receive, bonuses for two fiscal years, it would be the average of those two bonuses) or, if Executive has not yet received, or been entitled to receive, a bonus with respect to a completed fiscal year, an amount equal to Executive’s target\nbonus for the current fiscal year. The Company will pay all such bonus amounts as soon as they reasonably can be calculated, but in all events within two and one-half\n(2 1⁄2) months of the end of the fiscal year in which the termination occurs. Notwithstanding the foregoing, all payments to be made or benefits to be\nprovided under this Section are subject to the provisions of Section 5(g) below."} +{"idx": 6, "order": 19, "level": 2, "span": "(b) Stock\nSubject to Section 10 hereof, on\nand as of the effective date of the termination of employment, all of Executive’s outstanding stock options and restricted stock grants under the Company’s stock option and other benefit plans shall immediately vest. Additionally, all of\nExecutive’s outstanding stock options shall remain outstanding until the original expiration date of the stock options (disregarding any earlier expiration date based on Executive’s termination of employment)."} +{"idx": 6, "order": 20, "level": 2, "span": "(c) Limitation\nNotwithstanding the foregoing, with respect to a termination occurring during the two year period commencing the day\nafter the award date of Executive’s initial equity grants following employment by the Company, the amount payable to Executive pursuant to Section 5(a) shall be reduced, but not below zero, on a dollar-for-dollar basis by the value of any equity-related awards that vests as a result of Section 5(b) or similar provisions in any equity-related benefit plans."} +{"idx": 6, "order": 21, "level": 2, "span": "(d) Life Insurance\nThe Company shall continue to provide Executive on a monthly basis with group and additional life insurance\ncoverage, no less frequently than monthly, for a period of twelve (12) months immediately following termination of employment."} +{"idx": 6, "order": 22, "level": 2, "span": "(e)\nMedical Insurance. The Company shall continue to provide Executive and his family with group medical insurance coverage, no less frequently than monthly, under the Company’s medical plans (as the same may change from time to time) or\nother substantially similar health insurance for a period of twelve (12) months immediately following termination of employment."} +{"idx": 6, "order": 23, "level": 2, "span": "(f) Group Disability\nThe Company shall continue to provide Executive coverage, no less\nfrequently than monthly, under the Company’s group disability plan for a period of twelve (12) months immediately following termination of employment (subject in the case of long-term disability to the availability of such coverage under\nCompany’s insurance policy)."} +{"idx": 6, "order": 24, "level": 2, "span": "(g) Section 409A\nNotwithstanding any other provisions of this Agreement, it is intended that\nany payment or benefit which is provided pursuant to or in connection with this Agreement and which is considered to be nonqualified deferred compensation subject to Section 409A of the Internal Revenue Code of 1986, as amended (the\n“Code”), will be provided and paid in a manner, and at such time, as complies with Section 409A of the Code. For purposes of this Agreement, all rights to payments and benefits hereunder shall be treated as rights to receive a series of\nseparate payments and benefits to the fullest extent allowed by Section 409A of the Code. If Executive is a key employee (as defined in Section 416(i) of the Code without regard to paragraph (5) thereof) and any of Company’s stock is\npublicly traded on an established securities market or otherwise, then the payment of any amount or provision of any benefit under this Agreement which is considered to be nonqualified deferred compensation subject to Section 409A of the Code shall\nbe deferred for six (6) months after the Termination Date or, if earlier, Executive’s death (the “409A Deferral Period”), as required by Section 409A(a)(2)(B)(i) of the Code. In the event payments are otherwise due to be made in\ninstallments or periodically during such 409A Deferral Period, the payments which would otherwise have been made in the 409A Deferral Period shall be accumulated and paid in a lump sum as soon as the 409A Deferral Period ends, and the balance of the\npayments shall be made as otherwise scheduled. In the event, benefits are otherwise to be provided hereunder during such 409A Deferral Period, any such benefits may be provided during the 409A Deferral Period at Executive’s expense, with\nExecutive having a right to reimbursement for such expense from the Company as soon as the 409A Deferral Period ends, and the balance of the benefits shall be provided as otherwise scheduled. For purposes of this Agreement, Executive’s\ntermination of employment shall be construed to mean a “separation from service” within the meaning of Section 409A of the Code where it is reasonably anticipated that no further services will be performed after such date or that the level\nof bona fide services Executive would perform after that date (whether as an employee or independent contractor) would permanently decrease to less than fifty percent (50%) of the average level of bona fide services performed over the immediately\npreceding thirty-six (36)-month period. Without limitation, if any payment or benefit which is provided pursuant to or in connection with this Agreement and which is considered to be nonqualified deferred\ncompensation subject to Section 409A of the Code fails to comply with Section 409A of the Code, and Executive incurs any additional tax, interest and penalties under Section 409A of the Code, Company will pay Executive an additional amount so that,\nafter paying all taxes, interest and penalties on such additional amount, Executive has an amount remaining equal to such additional tax, interest and penalties. All payments to be made to Executive pursuant to the immediately preceding sentence\nshall be payable no later than when the related taxes, interest and penalties are to be remitted. Any right to reimbursement incurred due to a tax audit or litigation addressing the existence or amount of any tax liability addressed in the\nimmediately"} +{"idx": 6, "order": 25, "level": 2, "span": "(h) Offset\nAny fringe benefits received by Executive in connection with any other employment that are reasonably comparable, but not\nnecessarily as beneficial, to Executive as the fringe benefits then being provided by the Company pursuant to this Section 5, shall be deemed to be the equivalent of, and shall terminate the Company’s responsibility to continue providing,\nthe fringe benefits then being provided by the Company pursuant to this Section 5. The Company acknowledges that if Executive’s employment with the Company is terminated, Executive shall have no duty to mitigate damages."} +{"idx": 6, "order": 26, "level": 3, "span": "(i) General Release\nAcceptance by Executive of any amounts pursuant to this Section 5 shall constitute a full and complete\nrelease by Executive of any and all claims Executive may have against the Company, its officers, directors and affiliates, including, but not limited to, claims she might have relating to Executive’s cessation of employment with the Company;\nprovided, however, that there may properly be excluded from the scope of such general release the following:"} +{"idx": 6, "order": 27, "level": 3, "span": "(i) claims\nthat Executive may have against the Company for reimbursement of ordinary and necessary business expenses incurred by him during the course of his employment;"} +{"idx": 6, "order": 28, "level": 3, "span": "(ii) claims that may be made by the Executive for payment of Base Salary, fringe benefits or restricted stock or stock options\nproperly due to him; or"} +{"idx": 6, "order": 29, "level": 3, "span": "(iii) claims respecting matters for which the Executive is entitled to be indemnified under the\nCompany’s Certificate of Incorporation or Bylaws, respecting third party claims asserted or third party litigation pending or threatened against the Executive."} +{"idx": 6, "order": 30, "level": 1, "span": "6. Effect of Change in Control."} +{"idx": 6, "order": 31, "level": 2, "span": "(a) If within one year following a “Change of Control” (as hereinafter defined), Executive terminates his employment with the\nCompany for Good Reason (as hereinafter defined) or the Company terminates Executive’s employment for any reason other than Cause, death or disability, the Company shall pay to Executive: (1) an amount equal to one times the\nExecutive’s Base Salary as of the date of termination; (2) an amount equal to one times the average annual cash bonus paid to Executive for the two fiscal years immediately preceding the date of termination (and a pro rata portion for any\npartial year); (3) all benefits under the Company’s various benefit plans, including group healthcare, dental and life, for the period equal to twelve months from the date of termination; and (4) subject to Section 10 hereof, on and\nas of the effective date of the termination of employment, all of Executive’s outstanding stock options and restricted stock grants under the Company’s stock option and other benefit plans shall immediately vest. The Company shall pay the\namounts set forth in (1) and (2) above in one lump sum payment as soon as administratively practicable (and within thirty (30) days) following Executive’s termination of employment. The benefits provided under (3) above shall be\nprovided no less frequently than monthly following the date of termination of employment. Additionally, Executive’s outstanding stock options shall remain outstanding until the original expiration date of the stock options (disregarding any\nearlier expiration date based on Executive’s termination of employment). Notwithstanding the foregoing, all payments to be made and benefits to be provided under this Section are subject to the provisions of Section 5(g) above."} +{"idx": 6, "order": 32, "level": 2, "span": "(b) “Change of Control” shall mean the date as of which: (i) there shall be consummated (1) any consolidation or merger of\nARRIS International plc, as parent corporation of the Company (“Parent”), to which the Parent is not the continuing or surviving corporation or pursuant to which Parent’s ordinary shares would be converted into cash, securities or\nother property, other than a merger of the Parent in which the holders of the Parent’s ordinary shares immediately prior to the merger own more than 50% of the total fair market value or total voting power of the continuing or surviving entity,\nor (2) any sale, lease, exchange or other transfer (in one transaction or a series of related transactions) of all, or substantially all, of the assets of the Parent or (ii) the stockholders of the Parent approve any plan or proposal for\nthe liquidation or dissolution of the Parent; or (iii) any person, as such term is used in Sections 13(d) and 14(d)(2) of the Securities Exchange Act of 1934, as amended (the “Exchange Act”), shall become the beneficial owner (within\nthe meaning of Rule 13d-3 under the Exchange Act) of 30% or more of the Parent’s outstanding ordinary shares (in a single transaction or within twelve (12) months from the date of the final\nacquisition) or (iv) during any one year, individuals who at the beginning of such period constitute the entire Board of Directors of the Parent shall cease for any reason to constitute a majority thereof unless the appointment, election, or\nthe nomination for election by the Parent’s stockholders, of each new director was approved by a vote of at least two-thirds of the directors still then in office who were directors at the beginning of\nthe period. This definition of “Change in Control” is intended to comply with the definition of a change in the ownership or effective control of the Parent or in the ownership of a substantial portion of the assets of the Parent within\nthe meaning of Section 409A(a)(2)(A)(v) of the Code and shall be construed consistent with that intent."} +{"idx": 6, "order": 33, "level": 2, "span": "(c) “Good Reason” shall mean any of the following actions taken by the Company without\nthe Executive’s written consent after a Change of Control:"} +{"idx": 6, "order": 34, "level": 3, "span": "(i) A reduction by the Company in the Executive’s\nBase Salary as in effect on the date of a Change of Control or Potential Change of Control, or as the same may be increased from time to time during the term of her Agreement;"} +{"idx": 6, "order": 35, "level": 3, "span": "(ii) The Company shall require the Executive to be based anywhere other than at the location where the Executive is based on\nthe date of a Change of Control or Potential Change of Control, or if Executive agrees to such relocation, the Company fails to reimburse the Executive for moving and all other expenses reasonably incurred with such move;"} +{"idx": 6, "order": 36, "level": 3, "span": "(iii) The Company shall fail to continue in effect any Company-sponsored plan or benefit that is in effect on the date of a\nChange of Control or Potential Change of Control, that provides (A) incentive or bonus compensation, (B) fringe benefits such as vacation, medical benefits, life insurance and accident insurance, (C) reimbursement for reasonable\nexpenses incurred by the Executive in connection with the performance of duties with the Company, or (D) retirement benefits such as a Code Section 401(k) plan, except to the extent that such plans taken as a whole are replaced with\nsubstantially comparable plans;"} +{"idx": 6, "order": 37, "level": 3, "span": "(iv) Any material breach by the Company of any provision of this Agreement; and"} +{"idx": 6, "order": 38, "level": 3, "span": "(v) Any failure by the Company to obtain the assumption of this Agreement by any successor or assign of the Company effected in\naccordance with the provisions of Section 6."} +{"idx": 6, "order": 39, "level": 2, "span": "(d) “Potential Change of Control” shall mean the date as of which\n(1) the Parent enters into an agreement the consummation of which, or the approval by shareholders of which, would constitute a Change of Control; (ii) proxies for the election of Directors of the Parent are solicited by anyone other than\nthe Parent; (iii) any person (including, but not limited to, any individual, partnership, joint venture, corporation, association or trust) publicly announces an intention to take or to consider taking actions which, if consummated, would\nconstitute a Change of Control; or (iv) any other event occurs which is deemed to be a Potential Change of Control by the Board of the Parent and the Board of the Parent adopts a resolution to the effect that a Potential Change of Control has\noccurred."} +{"idx": 6, "order": 40, "level": 2, "span": "(e) If the payments to Executive pursuant to this Agreement (when considered with all other payments made to Executive as a\nresult of a termination of employment that are subject to Section 280G of the Code) (the amount of all such payments, collectively, the “Parachute Payment”) result in Executive becoming liable for the payment of any excise taxes pursuant\nto section 4999 of the Code (“280G Excise Tax”), Executive will receive the greater on an after-tax basis of (i) the severance benefits payable pursuant to this Agreement or (ii) the\nseverance benefits payable pursuant to this Agreement as reduced to avoid imposition of the 280G Excise Tax (the “Conditional Capped Amount”)."} +{"idx": 6, "order": 41, "level": 1, "span": "7.\nNon-Competition."} +{"idx": 6, "order": 42, "level": 2, "span": "(a) As used in this Section:"} +{"idx": 6, "order": 43, "level": 2, "span": "(b) Executive agrees that during\nExecutive’s employment hereunder and during the Restricted Period, Executive shall not, within the Restricted Territory, perform services on his own behalf or on behalf of any other person or entity, which are the same as or similar to those he\nprovided to Company and which support any business activities which compete with the Business of Company."} +{"idx": 6, "order": 44, "level": 2, "span": "(c) Executive agrees that\nduring Executive’s employment hereunder and during the Restricted Period, Executive shall not, directly or indirectly, solicit any actual or prospective customers of Company with whom Executive had Material Contact, for the purpose of selling\nany products or services which compete with the Business of Company."} +{"idx": 6, "order": 45, "level": 2, "span": "(d) Executive agrees that during Executive’s employment\nhereunder and during the Restricted Period, Executive shall not, directly or indirectly, solicit any actual or prospective vendor of Company with whom Executive had Material Contact, for the purpose of providing products or services in support of\nany business activities which compete with the Business of Company."} +{"idx": 6, "order": 46, "level": 2, "span": "(e) Executive agrees that during Executive’s employment\nhereunder and during the Restricted Period, Executive shall not, directly or indirectly, solicit or induce any employee or independent contractor of Company with whom Executive had Material Contact to terminate such employment or contract with\nCompany."} +{"idx": 6, "order": 47, "level": 1, "span": "8. Nondisclosure of Trade Secrets\nDuring the term of this Agreement, Executive will have access\nto and become familiar with various trade secrets and proprietary and confidential information of the Company, its subsidiaries and affiliates, including, but not limited to, processes, designs, computer programs, compilations of information,\nrecords, sales procedures, customer requirements, pricing techniques, product plans, marketing plans, strategic"} +{"idx": 6, "order": 48, "level": 1, "span": "9. Return of Profits\nIn the event that Executive violates any of the provisions of Sections 7 or 8 hereof or fails\nto provide the notice required by Section 4(d) hereof, the Company shall be entitled to receive from Executive the profits, if any, received by Executive upon exercise of any Company granted stock options or stock appreciation rights or upon lapse\nof the restrictions on any grant or restricted stock to the extent such options or rights were exercised, or such restrictions lapsed, subsequent to six months prior to the termination of Executive’s employment. In addition, payments under this\nAgreement shall be subject to (a) any applicable law or regulation, stock exchange rule, or policy required by the foregoing providing for recoupment or clawback, and (b) any recoupment or clawback policy of the Company in effect on or\nafter the date hereof (or the date of any amendment hereto)."} +{"idx": 6, "order": 49, "level": 1, "span": "10. Severability\nThe parties hereto intend all provisions of\nSections 7, 8 and 9 hereof to be enforced to the fullest extent permitted by law. Accordingly, should a court of competent jurisdiction determine that the scope of any provision of Sections 7, 8 or 9 hereof is too broad to be enforced as written,\nthe parties intend that the court reform the provision to such narrower scope as it determines to be reasonable and enforceable. In addition, however, Executive agrees"} +{"idx": 6, "order": 50, "level": 1, "span": "11. Arbitration—Exclusive Remedy\n(a) The parties agree that the exclusive remedy or method of resolving all disputes or questions arising out of or relating to this Agreement\nshall be arbitration. Arbitration shall be held in Atlanta, Georgia by three arbitrators, one to be appointed by the Company, a second to be appointed by Executive, and a third to be appointed by those two arbitrators. The third arbitrator shall act\nas chairman. Any arbitration may be initiated by either party by written notice (“Arbitration Notice”) to the other party specifying the subject of the requested arbitration and appointing that party’s arbitrator. (b) If (i) the non-initiating party fails to appoint an arbitrator by written notice to the\ninitiating party within ten days after the Arbitration Notice, or (ii) the two arbitrators appointed by the parties fail to appoint a third arbitrator within ten days after the date of the appointment of the second arbitrator, then the American\nArbitration Association, upon application of the initiating party, shall appoint an arbitrator to fill that position. (c) The arbitration\nproceeding shall be conducted in accordance with the rules of the American Arbitration Association. A determination or award made or approved by at least two of the arbitrators shall be the valid and binding action of the arbitrators. The costs of\narbitration (exclusive of the expense of a party in obtaining and presenting evidence and attending the arbitration and of the fees and expenses of legal counsel to a party, all of which shall be borne by that party) shall be borne by the Company\nonly if Executive receives substantially the relief sought by him in the arbitration, whether by settlement, award or judgment; otherwise, the costs shall be borne equally between the parties. The arbitration determination or award shall be final\nand conclusive on the parties, and judgment upon such award may be entered and enforced in any court of competent jurisdiction. To the extent the Company is required to reimburse Executive for any such cost, fees and expenses, the Company shall\nreimburse such costs, fees and expenses within 90 days following the final determination, award, judgment or settlement."} +{"idx": 6, "order": 51, "level": 1, "span": "12. Miscellaneous\n(a) Notices. Any notices, consents, demands, requests, approvals and other communications to be given under this Agreement by either\nparty to the other must be in writing and must be either (i) personally delivered, (ii) mailed by registered or certified mail, postage prepaid with return receipt requested, (iii) delivered by overnight express delivery service or same-day local courier service, or (iv) delivered by facsimile transmission, to the address set forth below, or to such other address as may be designated by the parties from time to time in accordance with\nthis Section 12(a):\nIf to the Company:\nARRIS Group, Inc.\n3871 Lakefield Drive\nSuwanee, Georgia 30024\nAttention: Secretary\nIf to Executive:\nTo the last known address of Executive in the payroll records of\n\nthe Company\nNotices delivered personally or by overnight express delivery service or by local courier service are deemed\ngiven as of actual receipt. Mailed notices are deemed given three business days after mailing. Notices delivered by telex or facsimile transmission are deemed given upon receipt by the sender of the answer back (in the case of a telex) or\ntransmission confirmation (in the case of a facsimile transmission). (b) Entire Agreement. This Agreement supersedes any and all\nother agreements, either oral or written, between the parties with respect to the subject matter of this Agreement and contains all of the covenants and agreements between the parties with respect to the subject matter of this Agreement. (c) Modification. No change or modification of this Agreement is valid or binding upon the parties, nor will any waiver of any term or\ncondition in the future be so binding, unless the change or modification or waiver is in writing and signed by the parties to this Agreement. (d) Governing Law and Venue. The parties acknowledge and agree that this Agreement and the obligations and undertakings of the parties\nunder this Agreement will be performable in Georgia. This Agreement is governed by, and construed in accordance with, the laws of the State of Georgia. If any action is brought to enforce or interpret this Agreement, venue for the action will be in\nGeorgia. (e) Counterparts. This Agreement may be executed in counterparts, each of which constitutes an original, but all of which\nconstitutes one document."} +{"idx": 6, "order": 52, "level": 2, "span": "(f) Costs\nIf any action at law or in equity is necessary to enforce or interpret the terms of this\nAgreement, each party shall bear its own costs and expenses."} +{"idx": 6, "order": 53, "level": 2, "span": "(g) Estate\nIf Executive dies prior to the expiration of the term of employment or during\na period when monies are owing to him, any monies that may be due him from the Company under this Agreement as of the date of her death shall be paid to his estate and as when otherwise payable."} +{"idx": 6, "order": 54, "level": 2, "span": "(h) Assignment\nThe Company shall have the right to assign this Agreement to its successors or assigns. The terms\n“successors” and “assigns” shall include any person, corporation, partnership or other entity that buys all or substantially all of the Company’s assets or all of its stock, or with which the Company merges or consolidates.\nThe rights, duties and benefits to Executive hereunder are personal to him, and no such right or benefit may be assigned by him."} +{"idx": 6, "order": 55, "level": 2, "span": "(i)\nBinding Effect\nThis Agreement is binding upon the parties hereto, together with their respective executors, administrators, successors, personal representatives, heirs and permitted assigns."} +{"idx": 6, "order": 56, "level": 2, "span": "(j) Waiver of Breach\nThe waiver by the Company or Executive of a breach of any provision of this Agreement by Executive or the Company\nmay not operate or be construed as a waiver of any subsequent breach."} +{"idx": 6, "order": 57, "level": 1, "span": "IN WITNESS WHEREOF, the parties have executed this Agreement as of the date first above written."} +{"idx": 6, "order": 58, "level": 2, "span": "“Company”"} +{"idx": 6, "order": 59, "level": 2, "span": "ARRIS GROUP, INC."} +{"idx": 6, "order": 60, "level": 2, "span": "By:"} +{"idx": 6, "order": 61, "level": 2, "span": "/s/ R.J. Stanzione"} +{"idx": 6, "order": 62, "level": 2, "span": "Name:"} +{"idx": 6, "order": 63, "level": 2, "span": "R.J. Stanzione"} +{"idx": 6, "order": 64, "level": 2, "span": "Title:"} +{"idx": 6, "order": 65, "level": 2, "span": "Chairman & CEO"} +{"idx": 6, "order": 66, "level": 2, "span": "“Executive”"} +{"idx": 6, "order": 67, "level": 2, "span": "/s/ Timothy O’Loughlin"} +{"idx": 6, "order": 68, "level": 2, "span": "Timothy O’Loughlin"} diff --git a/data/auto_parse/level_freeze/state.json b/data/auto_parse/level_freeze/state.json index c9b1683..c4c4ab4 100644 --- a/data/auto_parse/level_freeze/state.json +++ b/data/auto_parse/level_freeze/state.json @@ -6,7 +6,8 @@ 2, 3, 4, - 5 + 5, + 6 ], "history": [ { @@ -139,6 +140,30 @@ "action": "freeze", "idx": 5, "n_records": 18 + }, + { + "ts": "2026-05-17T06:33:11", + "action": "freeze", + "idx": 6, + "n_records": 55 + }, + { + "ts": "2026-05-17T06:39:26", + "action": "freeze", + "idx": 6, + "n_records": 67 + }, + { + "ts": "2026-05-17T06:42:00", + "action": "freeze", + "idx": 6, + "n_records": 69 + }, + { + "ts": "2026-05-17T06:44:47", + "action": "freeze", + "idx": 6, + "n_records": 69 } ] } diff --git a/scripts/parse_doc2dict_with_config.py b/scripts/parse_doc2dict_with_config.py index 785ebb9..96903c4 100644 --- a/scripts/parse_doc2dict_with_config.py +++ b/scripts/parse_doc2dict_with_config.py @@ -2416,10 +2416,24 @@ def _split_inline_section_markers(rows: list[dict[str, Any]]) -> list[dict[str, # ". 14." — these indicate top-level numbered sections embedded # in the body text. # Use a stricter regex: number followed by period, whitespace, capital letter. - markers = list(re.finditer( + raw_markers = list(re.finditer( r"(?:(?<=[.\s\xa0])|^)(\d+)\.\s*[A-Z]", body, )) + # Filter out cross-references: a marker preceded by "Section" + # or "Sections" (case-insensitive, with optional whitespace/nbsp) + # is a textual reference like "this Section 5." or "Sections 7, + # 8 and 9 hereof", not a fresh top-level section heading. The + # tail context window covers up to 15 chars before the marker — + # enough for "Sections " variants without being so wide that it + # picks up unrelated mentions. + markers = [] + _SECTION_REF_RE = re.compile(r"(?i)\bSections?\s*[\xa0\s]*$") + for m in raw_markers: + pre = body[max(0, m.start() - 15):m.start()] + if _SECTION_REF_RE.search(pre): + continue + markers.append(m) if len(markers) < 2: continue @@ -3397,6 +3411,160 @@ def _split_sig_block_body_into_lines(body: str) -> list[str]: return out +def _split_iww_and_sig_from_body( + rows: list[dict[str, Any]], +) -> list[dict[str, Any]]: + """Extract an inline IN WITNESS WHEREOF + signature block from a body. + + doc2dict sometimes packs the entire signature page — IWW operating + clause, party labels, /s/ marks, By:/Name:/Title: fields — into the + trailing body text of the LAST lettered subsection of the main + agreement (e.g. "(j) Waiver of Breach" picks up everything that the + HTML walker couldn't promote into its own node). This destroys the + signature-page hierarchy mandated by the title-as-root rubric + (level_rubric.md §"Signature-page content emitted at the wrong + depth"): the IWW clause should be L1 and each sig-page line should + be L2. + + Structural detection (purely shape-based, no phrase matching): + + 1. The document has ZERO existing records whose title/body STARTS + with the IWW phrase. If any record already carries IWW as its + leading text, the sig page is already correctly separated and + this function is a no-op for that document. + 2. Find a record whose body contains the IWW phrase MID-body (not + at position 0). The text before the IWW is the record's real + body; the text from IWW onward is the misplaced sig page. + 3. Split: + - Keep the prefix on the original record. + - Emit the IWW operating clause sentence as a new L1 record + (depth = 1 + subdoc_penalty). + - Split the remainder by newlines into sig-line L2 records + (depth = 2 + subdoc_penalty). Each non-empty, non-banner + line becomes its own L2 record. Duplicate consecutive + lines (a doc2dict pathology in this idx) are collapsed. + + This function runs BEFORE `_explode_signature_block_lines` so the + new sig-line records get the standard sig-line marking. The IWW + record is detected by that pass via `_is_iww_clause` and pinned + at L1. + """ + # Guard: only act when no existing record carries IWW as leading text. + # Without this, we'd double-split documents that already have a clean + # IWW record (the prior idxs) and break their frozen baselines. + for r in rows: + if r.get("is_envelope") or r.get("scope") == "trailer": + continue + title = (r.get("title") or "").strip() + body = (r.get("body_direct") or "").strip() + if _is_iww_clause(title) or _is_iww_clause(body): + return rows + + _IWW_INLINE_RE = re.compile(r"(?i)IN\s+WITNESS\s+WHEREOF") + + next_id = max((r["node_id"] for r in rows), default=-1) + 1 + new_rows: list[dict[str, Any]] = [] + + for r in rows: + new_rows.append(r) + if r.get("is_envelope") or r.get("scope") == "trailer": + continue + body = r.get("body_direct") or "" + if not body: + continue + m = _IWW_INLINE_RE.search(body) + # Require IWW NOT at start (start-of-body IWW is already its own + # record from the guard above). Require some substantive prefix + # so we don't strip a record whose body IS the sig page. + if not m or m.start() == 0: + continue + + # Split body at IWW position. Prefix stays on the original record. + prefix = body[:m.start()].rstrip() + iww_and_after = body[m.start():] + + # The IWW operating clause sentence ends at the first period + # following the IWW phrase. The sig lines follow. + end_period = iww_and_after.find(".", m.end() - m.start()) + if end_period == -1: + # No period — treat whole text as IWW (no sig lines parsed + # separately). Skip; better to leave the body intact than + # emit a malformed record. + continue + iww_sentence = iww_and_after[:end_period + 1].strip() + sig_rest = iww_and_after[end_period + 1:] + + # Update original record body to just the prefix. + r["body_direct"] = prefix + r["body_direct_chars"] = len(prefix) + + subdoc_penalty = r.get("subdoc_penalty") or 0 + l1_depth = 1 + subdoc_penalty + l2_depth = 2 + subdoc_penalty + + # Emit the IWW operating clause as L1. + iww_record = { + "node_id": next_id, + "parent_node_id": r.get("parent_node_id"), + "depth": l1_depth, + "doc2dict_section_key": f"_iww_{next_id}", + "cls": "promoted text leaf", + "title": "", + "standardized_title": None, + "n_direct_section_children": 0, + "body_direct_chars": len(iww_sentence), + "body_recursive_chars": len(iww_sentence), + "body_direct": iww_sentence, + "body_recursive": iww_sentence, + "subdoc_penalty": subdoc_penalty, + "is_envelope": False, + "scope": "agreement", + } + new_rows.append(iww_record) + next_id += 1 + iww_node_id = iww_record["node_id"] + + # Split sig_rest into per-line records. Drop empty lines, drop + # banner/page-number/exhibit-footer chrome, dedupe lines (doc2dict + # in this idx duplicates labels, party names, and /s/ marks + # because the source HTML repeats each block twice). A real sig + # block has each line unique — party labels appear once, /s/ + # marks are unique per signer, names are unique per signer — so + # global per-block dedup is structurally correct here. Records + # are marked `_sig_line=True` so `_consolidate_sig_lines_after_iww` + # anchors them as one contiguous cluster right after the IWW + # operating clause regardless of how the source-position sorter + # places short label probes ("Company", "Executive") that match + # in the agreement body. + lines = _split_sig_block_body_into_lines(sig_rest) + seen_lines: set[str] = set() + for line in lines: + if line in seen_lines: + continue # collapse duplicate + seen_lines.add(line) + new_rows.append({ + "node_id": next_id, + "parent_node_id": iww_node_id, + "depth": l2_depth, + "doc2dict_section_key": f"_sig_line_{next_id}", + "cls": "promoted text leaf", + "title": line, + "standardized_title": None, + "n_direct_section_children": 0, + "body_direct_chars": 0, + "body_recursive_chars": len(line), + "body_direct": "", + "body_recursive": line, + "subdoc_penalty": subdoc_penalty, + "is_envelope": False, + "scope": "agreement", + "_sig_line": True, + }) + next_id += 1 + + return new_rows + + def _explode_signature_block_lines( rows: list[dict[str, Any]], ) -> list[dict[str, Any]]: @@ -3949,6 +4117,14 @@ def parse_one(idx: int, raw: str) -> tuple[dict[str, Any], list[dict[str, Any]]] # exhibit-number echoes). These are filing metadata wedged between # the SEC envelope and the agreement body. sections = _drop_pre_title_cover_records(sections) + # Split inline "IN WITNESS WHEREOF" + signature page out of a body. + # doc2dict sometimes packs the entire sig page into the trailing body + # of the LAST lettered subsection when the HTML walker couldn't + # promote it. This pass detects that pathology STRUCTURALLY (no + # existing IWW record in the document, IWW phrase appearing mid-body) + # and emits IWW as L1 + each sig-page line as L2 — restoring the + # title-as-root sig-page hierarchy. + sections = _split_iww_and_sig_from_body(sections) # Explode the signature page per the title-as-root rubric: # - IWW operating clause sits at L1 (signature-page header). # - Each signature-page line (party label, /s/, name, title,