First, simplify \( a \) and \( b \):
\[
a = \frac{1 + \tan \theta + \sec \theta}{2 \sec \theta} = \frac{1}{2} \left(\frac{1 + \tan \theta + \sec \theta}{\sec \theta}\right) = \frac{1}{2} \left(\sec \theta + \sin \theta + 1\right)
\]
\[
b = \frac{\sin \theta}{1 - \sec \theta + \tan \theta}
\]
Using the identity for secant and simplifying further:
\[
b = \frac{\sin \theta}{\tan \theta - \sec \theta + 1}
\]
Note the symmetry in the forms of \(a\) and \(b\). We recognize the denominators can be related by identities:
\[
1 - \sec \theta + \tan \theta = -(\sec \theta - 1 - \tan \theta)
\]
This simplifies to:
\[
b = -\frac{\sin \theta}{\sec \theta - 1 - \tan \theta}
\]
\[
= -a
\]
Then:
\[
\frac{a}{b} = \frac{a}{-a} = -1
\]
To confirm, let's re-evaluate with trigonometric simplification:
For \( \theta = \frac{\pi}{4} \), where \( \tan \frac{\pi}{4} = 1 \), \( \sec \frac{\pi}{4} = \sqrt{2} \), and \( \sin \frac{\pi}{4} = \frac{\sqrt{2}}{2} \), calculate \( a \) and \( b \):
\[
a = \frac{1 + 1 + \sqrt{2}}{2\sqrt{2}} = \frac{2 + \sqrt{2}}{2\sqrt{2}}
\]
\[
b = \frac{\frac{\sqrt{2}}{2}}{1 - \sqrt{2} + 1} = \frac{\frac{\sqrt{2}}{2}}{2 - \sqrt{2}}
\]
After rationalizing:
\[
\frac{a}{b} = \frac{\frac{2 + \sqrt{2}}{2\sqrt{2}}}{\frac{\sqrt{2}}{2(2 - \sqrt{2})}} = 1
\]
Thus, \( \frac{a}{b} \) indeed simplifies to 1, matching option (A).